Questions tagged [httprequest]

HTTP Request is a message within a request/response sequence, according to HTTP specification. May also refer an HttpRequest class in software frameworks and libraries that automates relevant functionality

From W3C specification:

A request message from a client to a server includes, within the first line of that message, the method to be applied to the resource, the identifier of the resource, and the protocol version in use.

    Request       = Request-Line              ;
                    *(( general-header        ;
                     | request-header         ;
                     | entity-header ) CRLF)  ;
                    CRLF
                    [ message-body ]          ;

See also:

7773 questions
121
votes
8 answers

How to set a Header field on POST a form?

How can I set a custom field in POST header on submit a form?
Reza Owliaei
  • 3,293
  • 7
  • 35
  • 55
120
votes
3 answers

How to use curl to get a GET request exactly same as using Chrome?

I have a web api http://something.com/api and I want to use GET to get the response body. This is my command: curl "http://something.com/api" Of course, it fails and gives an error message. When I use Chrome and input the above url, everythings…
wdetac
  • 2,712
  • 3
  • 20
  • 42
119
votes
5 answers

RESTful Alternatives to DELETE Request Body

While the HTTP 1.1 spec seems to allow message bodies on DELETE requests, it seems to indicate that servers should ignore it since there are no defined semantics for it. 4.3 Message Body A server SHOULD read and forward a message-body on any…
shelley
  • 7,206
  • 4
  • 36
  • 63
117
votes
4 answers

Is it possible to add Request Headers to an iframe src request?

I understand that you can set HTTP request headers very easily when making AJAX calls in JavaScript. However is it also possible to set custom HTTP request headers when inserting an iframe into a page via script?