HTTP - Post

About

The POST method requests that the target resource process the representation enclosed in the request according to the resource's own specific semantics.

They are by default not cached.

Usage

For example, POST is used for the following functions (among others):

  • Providing a block of data, such as the fields entered into an HTML form, to a data-handling process;
  • Posting a message to a bulletin board, newsgroup, mailing list, blog, or similar group of articles;
  • Creating a new resource that has yet to be identified by the origin server
  • Appending data to a resource's existing representation(s).

How to execute a Post request

To create and execute a post request, you can use the following element

Example

With CURL, to create a page with a title with Json data

curl -b cookie.txt \
   -d '{"page": [{"title": "Hello World"}]}' \
   -H "Content-Type: application/json" \
   -H "Origin: https://mywebsite.com" \
   https://api-host.com/api/posts

Management

Response

If one or more resources has been created on the origin server as a result of successfully processing a POST request, the origin server SHOULD send :

  • a 201 (Created) response
  • containing a Location header field that provides an identifier for the primary resource created

Cache

Responses to POST requests are only cacheable when they include explicit freshness information

Documentation / Reference





Discover More
Cors Flowchart
Browser - Cross Origin Resource Sharing (CORS)

Cross-origin resource sharing (CORS) is a mechanism that: * allows a HTTP server * to control the cross-origin requests executed by a browser. In short, a HTTP server may allow or not to receive...
Chrome Devtool Xhr Fetch Request
Browser - Web API - Fetch function

The fetch function is part of the web api function and is a AJAX call. It's one of the possibilities to fetch a resource. XMLHttpRequest (XHR) The fetch function returns a promise as response. The Fetch...
Chrome Devtool Xhr Fetch Request
Browser - XMLHttpRequest (XHR) API

The XMLHttpRequest is a web api function that performs an resource fetch with an Aysnchronous HTTP request XMLHttpRequestAPIAJAX programmingfetch API The status of an XHR request. Value Constant...
Card Puncher Data Processing
Consumer Analytics - Event Collector

A collector collects event send by a tracker The event and data send are describe in a measurement protocol Data aggregation refers to techniques for gathering individual data records (for example...
HTML Form - 1001 ways to submit a Form and handle the corresponding Event

This page talks and shows all the ways on how to submit a form and handle the submit event in javascript. How a form can be submitted ? HTML One way is to include a input element of type submit that...
Http Status 304 Chrome Devtool
HTTP - Redirect (status codes 3xx) - Client must take additional action

The HTTP 3xx class of status code indicates that the client (user or user agent) must take additional action to complete the request. The redirect url is defined by the location header. A user agent...
HTTP - Webhook (Callback)

A Webhook is a script that makes an HTTP callback when a specific action occurs (a event-notification). Webhooks push information to endpoint when an action occurs via an request. For instance: a POST...
Card Puncher Data Processing
IO - CRUD (Create/Read/Update/Delete) - basic functions of persistent storage

In computer programming, create, read, update and delete (as an acronym CRUD) are the four basic functions of persistent storage. Operation SQL HTTP File System mutator Create INSERT PUT...
Card Puncher Data Processing
IO - Create Operation

create is a IO operation that will add/insert/create data in a data store. The following command are create operation: SQL: INSERT HTTP: PUT / POST File: Write
Map Of Internet 1973
Network - Remote Transfer Application Protocols / Remote File Access (Http, Ftp, Scp, )

Network - Remote Transfer Application Protocols / Remote File Access (Http, Ftp, Scp, ) ... This page is applications that implements a protocol to transfer/transport data: from a remote services...



Share this page:
Follow us:
Task Runner