Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to send large data using POST method?

Tags:

html

How do you send large amount of data using POST method?

I heard that post method default is 8M now what if you exceed that size? How would you send a plain text to the server?

like image 249
Andrew Chamberlain Avatar asked Sep 18 '12 10:09

Andrew Chamberlain


People also ask

Can HTTP POST send large amounts of data?

Notes on POST: Appends the form data inside the body of the HTTP request (the submitted form data is not shown in the URL) POST has no size limitations, and can be used to send large amounts of data.

How much data we can send through POST method?

In GET method, values are visible in the URL. In POST method, values are not visible in the URL. GET has a limitation on the length of the values, generally 255 characters. POST has no limitation on the length of the values since they are submitted via the body of HTTP.

Which method sends large amounts of data?

Using a cloud storage space like Google Drive, Dropbox, or OneDrive is one of the easiest and most popular methods for sending large files. Depending on your email provider, you'll likely be able to use a corresponding cloud storage — like Google Drive for Gmail, or OneDrive for Outlook.com.


2 Answers

A good answer by David:

The url portion of a request (GET and POST) can be limited by both the browser and the server - generally the safe size is 2KB as there are almost no browsers or servers that use a smaller limit.

The body of a request (POST) is normally* limited by the server on a byte size basis in order to prevent a type of DoS attack (note that this means character escaping can increase the byte size of the body). The most common server setting is 10MB, though all popular servers allow this to be increased or decreased via a setting file or panel.

*Some exceptions exist with older cell phone or other small device browsers - in those cases it is more a function of heap space reserved for this purpose on the device then anything else.

What is the size limit of a post request?

NOTE: 2MB of data by URL means 2097152 Char in one request.

Also if you want to send more data you can use multipal ajax request

like image 75
GajendraSinghParihar Avatar answered Sep 22 '22 12:09

GajendraSinghParihar


Upload the file, as you'll probably get time outs if there are interruptions.

Are you sending to a PHP script? If so you may need to increase upload size in php.ini

Search for upload_max_filesize

like image 23
D0nkey Avatar answered Sep 25 '22 12:09

D0nkey