Questions tagged [http-post]

POST is one of the HTTP protocol methods; it is used when the client needs to send data to the server, such as when uploading a file, or submitting a completed form.

POST is one of the HTTP protocol methods; it is used when the client needs to send data to the server as part of the request, such as when uploading a file or submitting a completed form.

In contrast to the GET request method where only a URL and headers are sent to the server, POST requests also include a message body. This allows for arbitrary length data of any type to be sent to the server. A header-field in the POST request usually indicates the message body's Internet media type.

Links

Related

, , , , , ,

8699 questions
93
votes
8 answers

Logging POST data from $request_body

I have my config setup to handle a bunch of GET requests which render pixels that work fine to handle analytics and parse query strings for logging. With an additional third party data stream, I need to handle a POST request to a given url that has…
Chris Barretto
  • 9,379
  • 3
  • 42
  • 45
91
votes
9 answers

How to redirect with post data (Django)

When processing a POST request in the Django views.py file, I sometimes need to redirect it to another url. This url I'm redirecting to is handled by another function in the same Django views.py file. Is there a way of doing this and maintaining the…
FunLovinCoder
  • 7,597
  • 11
  • 46
  • 57
91
votes
6 answers

Uploading file using POST request in Node.js

I have problem uploading file using POST request in Node.js. I have to use request module to accomplish that (no external npms). Server needs it to be multipart request with the file field containing file's data. What seems to be easy it's pretty…
Łukasz Jagodziński
  • 3,009
  • 2
  • 25
  • 33
88
votes
7 answers

Send POST request with JSON data using Volley

I would like to send a new JsonObjectRequest request: I want to receive JSON data (response from server): OK I want to send JSON formatted data with this request to the server JsonObjectRequest request = new JsonObjectRequest( …
anthony
  • 7,653
  • 8
  • 49
  • 101
87
votes
4 answers

OkHttp Post Body as JSON

So, back when I was using Koush's Ion, I was able to add a json body to my posts with a simple .setJsonObjectBody(json).asJsonObject() I'm moving over to OkHttp, and I really don't see a good way to do that. I'm getting error 400's all over the…
Pixel Perfect
  • 1,266
  • 1
  • 11
  • 14
87
votes
11 answers

HTTP POST payload not visible in Chrome debugger?

I have checked out this and that. However, my debugger looks like below. Failure example . No form data, No raw content Raw example (* Although path is different from the screen capture, both of them are unable to read post data) POST…
Mond Wan
  • 1,862
  • 2
  • 17
  • 21
86
votes
7 answers

Sending an HTTP POST request on iOS

I'm trying to send an HTTP Post with the iOS application that I'm developing but the push never reaches the server although I do get a code 200 as response (from the urlconnection). I never get a response from the server nor does the server detect…
85
votes
6 answers

How can I use JQuery to post JSON data?

I would like to post Json to a web service on the same server. But I don't know how to post Json using JQuery. I have tried with this code: $.ajax({ type: 'POST', url: '/form/', data: {"name":"jonas"}, success: function(data) {…
Jonas
  • 121,568
  • 97
  • 310
  • 388
85
votes
3 answers

What is the difference between [AcceptVerbs(HttpVerbs.Post)] and [HttpPost]?

I can decorate an action either with the [AcceptVerbs(HttpVerbs.Post)]/[AcceptVerbs(HttpVerbs.Get)] [AcceptVerbs(HttpVerbs.Post)] public ActionResult Create(string title) { // Do Something... } or with the [HttpPost]/[HttpGet]…
Lorenzo
  • 29,081
  • 49
  • 125
  • 222
82
votes
2 answers

ASP.net Core RC2 Web API POST - When to use Create, CreatedAtAction, vs. CreatedAtRoute?

What are the fundamental differences of those functions? All I know is all three result in a 201, which is appropriate for a successful POST request. I only follow examples I see online, but they don't really explain why they're doing what they're…
Mickael Caruso
  • 8,721
  • 11
  • 40
  • 72
81
votes
3 answers

How to receive json data using HTTP POST request in Django 1.6?

I am learning Django 1.6. I want to post some JSON using HTTP POST request and I am using Django for this task for learning. I tried to use request.POST['data'], request.raw_post_data, request.body but none are working for me. my views.py is …
Alok
  • 7,734
  • 8
  • 55
  • 100
79
votes
4 answers

How can you add a Certificate to WebClient (C#)?

I know it is pretty simple to add a certificate to a HttpWebRequest. However, I have not found a way to do the equivalent using WebClient. Basically, I want to send out a POST with a specific certificate using WebClient. How would you accomplish…
Andrew
  • 3,524
  • 5
  • 35
  • 50
75
votes
6 answers

Get page output with curl --fail

Calling curl without parameters, i get the page output, even with an http status code = 404: $ curl http://www.google.com/linux;
Thom Thom Thom
  • 1,279
  • 1
  • 11
  • 21
73
votes
2 answers

Issue reading HTTP request body from a JSON POST in PHP

I'm writing a script that is registered as an endpoint for a webhook. I know that it's successfully registered because I'm writing the header of every request to my server logs. Here's a sample: Content-Type: text/xml; charset=UTF-8 User-Agent:…
Hartley Brody
  • 8,669
  • 14
  • 37
  • 48
71
votes
4 answers

Is there a max size for POST parameter content?

I'm troubleshooting a Java app where XML is sent between two systems using HTTP POST and Servlet. I suspect that the problem is that the XML is growing way too big. Is it possible that this is the problem? Is there a limit? When it doesn't work, the…
l3dx
  • 2,930
  • 6
  • 33
  • 43