How-to articles, tricks, and solutions about POST

Curl and PHP - how can I pass a json through curl by PUT,POST,GET

To pass a JSON object through cURL using the PUT method, you can use the following command:

curl POST format for CURLOPT_POSTFIELDS

To make a POST request with PHP's cURL functions, you can use the CURLOPT_POST option to send POST data.

Get the POST request body from HttpServletRequest

To get the POST request body from an HttpServletRequest object in Java, you can use the getReader method of the ServletRequest interface to read the request body as a BufferedReader and then use the readLine method to read the data as a string.

How can I select and upload multiple files with HTML and PHP, using HTTP POST?

You can use the following HTML code to create a form that allows users to select and upload multiple files.

How do I print all POST results when a form is submitted?

To print all the POST results when a form is submitted with PHP, you can use the print_r($_POST) function.

How to access the php.ini from cPanel?

To access the php.ini file from cPanel, you can follow these steps:

How to Create a jQuery Ajax Post with PHP

Here, we will share with you how to create a jQuery Ajax post request with PHP. Just check out the examples and choose the one that suits your needs best.

How to get body of a POST in php?

To get the body of a POST request in PHP, you can use the file_get_contents function and pass it the special php://input stream.

How to Send a Post Request with PHP

In this snippet, we will share with you the most flexible and powerful ways of sending post requests with the help of PHP. Just check out the examples.

HTTP POST using JSON in Java

To make an HTTP POST request using JSON in Java, you can use the HttpURLConnection class available in the java.net package. Here's an example of how to do it:

HttpServletRequest get JSON POST data

To get JSON POST data from an HttpServletRequest object in Java, you can use the getReader method of the ServletRequest interface to read the request body as a BufferedReader and then use the readLine method to read the data as a string.

Issue reading HTTP request body from a JSON POST in PHP

In PHP, you can read the body of an HTTP request using the file_get_contents('php://input') function.

Java - sending HTTP parameters via POST method easily

To send HTTP parameters via the POST method in Java, you can use the java.net.URL and java.net.HttpURLConnection classes. Here is an example of how you can do this:

Post Requests with cURL

cURL is applied for making requests with different protocols. A post request can send user collected data to a server. Find out how to do that accurately.

Send value of submit button when form gets posted

In PHP, you can access the value of a submit button when a form is posted in the following way:

Sending HTTP POST Request In Java

To send an HTTP POST request in Java, you can use the java.net.URL and java.net.HttpURLConnection classes. Here is an example of how you can use these classes to send a POST request:

Setting POST variable without using form

To set the value of a POST variable in PHP, you can use the following code:

What does %5B and %5D in POST requests stand for?

The strings "%5B" and "%5D" are URL-encoded versions of the square brackets "[" and "]", respectively.