post-request tagged requests and articles

Categorized request examples and articles tagged with [post-request] keyword
POST JSON Example
An example of posting a JSON string to the REST API endpoint. In this post JSON example, the Content-Type: application/json request header indicates the media type of the resource in the request body. The Accept: application/json request header tells the server that the client expects JSON. The Content-Type: application/json response header indicates that the server returned JSON.

Curl POST Form Example
An example of a Curl command to post a form in a URL-encoded format. The form data is passed as key/value pairs with -d curl command-line parameter. The Content-Type header application/x-www-form-urlencoded specifies the media type of the resource as urlencoded form data.

POST Request Example
An example of making an HTTP POST request to the server. In this POST request example, the Content-Type request header indicates the media type of the POST body, and the Content-Length request header indicates the size of the data in the POST request body.

Curl POST XML Example
An example of a Curl command to post an XML string to the API endpoint. In this post XML request example, the 'Content-Type: application/xml' request header indicates that the request body contains an XML. The 'Accept: application/xml' request header tells the server that the client expects an XML. The XML is passed in the Curl -d command-line parameter.

POST XML Example
An example of sending an XML string to the target URL. In this post XML example, the Content-Type: application/xml request header indicates the media type of the resource in the request body. The Accept: application/xml request header tells the server that the client expects an XML media type. The Content-Type: application/xml response header indicates that the server returned XML.

Curl POST Request
An example of making a POST request using Curl. The -X POST command line parameter tells Curl to use the POST method for this request. The -d command line parameter contains the data to send to the server. The Curl -H "Content-Type: application/json" command line parameter specifies the media type of the resource in the request body.

POST JSON String With Basic Authentication
An example of posting JSON string with basic auth credentials. The user authentication credentials are automatically converted to the Base64 encoded string and passed to the server with Authorization: Basic bG9naW46cGFzc3dvcmQ= request header.

Convert Latitude and Longitude to Address via REST API
Convert latitude and longitude to a location (reverse geocode) by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

Geocode Address via REST API
Get the associated latitude and longitude for an address by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

Search Map Objects by Address via REST API
Search the objects on the map next to the address by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

Search Map Objects by Latitude and Longitude via REST API
Search the objects on the map using a latitude/longitude pair by sending a POST request to the Mapquest.com REST API. Replace {mapquest_apikey} with your own Mapquest API key.

HTTP POST Example
An example HTTP POST request that shows how to send data to an HTTP API endpoint. In this HTTP POST example, the Content-Type: application/json request header indicates the type of media resource in the POST request body. The Content-Length header indicates the size of data in the HTTP POST message.

curl -d
An example of sending data to the server with Curl. The data is passed with the -d command-line parameter. In this curl -d example, the -H command-line option explicitly specifies the content type in the request body.

Sample API POST Request
An example of making an API POST request to the API endpoint. In this API POST request sample, the Content-Type request header indicates the media type of the POST request body, and the Content-Length header indicates the size of the data in the API POST request body.

HTTP POST Request
The HTTP POST method is used to send data to the server. The type and size of data are not limited but you must specify the data type in the Content-Type header and the data size in the Content-Length header fields. The HTTP POST method is not idempotent, which means that sending an identical POST request multiple times may additionally affect the state or cause further side effects.