Questions tagged as 'http-headers'

1
answer

Send headers in HTTP Request with cURL in PHP

Hello, I made a function to make cURL calls to an API and I am able to make the calls but I am not able to send headers. Function: function curlRequest($endpoint, $verb, $headers, $params = null) { try { //Inicia o cURL...
asked by 20.09.2017 / 15:50
1
answer

Is it possible to handle http request header?

If you are dealing with a request http , is it possible to manipulate the request header? Or is it only possible to do such manipulation in response ? If possible, what languages are in it? Is there an example that might eluci...
asked by 04.01.2016 / 18:05
2
answers

What is the proper http code to respond to the content of an image?

Well, the question is quite straightforward. I'm wanting to use PHP to respond to the content of an image. However, I would like to know if the http status type will have any impact on the client (such as cache images in the browser). In t...
asked by 01.07.2015 / 16:06
1
answer

Remove http header in socket C

I made a socket in C. This program is operated by command line and compiled on Linux. It receives as a parameter a complete URI and a filename, and then connects to the server, retrieves the page and saves it to the reported file. After getting...
asked by 15.06.2015 / 16:45
0
answers

How to convert the value reported by the If-Modified-Since header into a PHP date (and vice versa)?

The header If-Modified-Since displays the following format of return: Wed, 21 Oct 2015 07:28:00 GMT I need to compare this date in this header item with the date a file was created on my server, using the filemtime($arquivo)...
asked by 23.10.2018 / 15:48
1
answer

How to change http header using () .get and () .post ()?

In a very brief way I need to send a jwt token in the http header of the requests, how can I change the headers of the jQuery requests $.post() and $.get() ? Example of how I do it using curl from the prompt: curl -H "Authoriza...
asked by 10.01.2018 / 20:46
0
answers

Return value in the Header of an HTTP (POST) call in the API [closed]

I'm using Postman to make the call in the API. That returns me this result in the body: thatcomesfromthisabstractclass:publicabstractclassResponseBase{publiclongSessionId{get;set;}}Aftercollectingthevalueoftheproperty,itfallsintothismethodof...
asked by 26.04.2017 / 20:40
0
answers

Identifying data format in web service

Good evening! I am implementing a service on a system for other systems to consume. This system consumes data in XML and JSON formats. I want to know if you have any way to identify when the user sends a string in XML format. Here's my code....
asked by 07.07.2016 / 22:24
0
answers

Slim Framework status code 404

When making requests I get the following error.    XMLHttpRequest can not load link . Response for preflight has invalid HTTP status code 404 My .htaccess looks like this: link When I'm not inside my domain it works. So I dec...
asked by 11.07.2016 / 15:56
0
answers

Android - Cookie HttpURLConnection

I have a native login screen on android, the user inserts login and password, and does a check via HttpURLConnection if the data is correct, if so it saves the cookie, and returns that login was done then is called a webview of this server, howe...
asked by 10.09.2015 / 13:38