Home

POSTrequest

A POST request is an HTTP method used to submit data to a specified resource, often causing a change in server state such as creating a new resource or triggering a server-side process. The request includes a message body that carries the data to be processed by the target resource.

Unlike GET, which retrieves data, or PUT, which may be used to replace a resource at a

A POST request line looks like: POST /path HTTP/1.1, accompanied by headers such as Content-Type and possibly

Typical uses include submitting web forms, uploading files, or sending structured data to an API to create

Security considerations include using HTTPS to protect the payload in transit, validating and sanitizing input to

known
URL,
POST
does
not
define
a
direct
resource
URL
for
the
outcome.
POST
is
generally
non-idempotent,
meaning
repeated
identical
requests
may
produce
additional
effects,
such
as
creating
multiple
records.
Authorization.
The
body
can
be
in
various
formats,
with
common
types
including
application/json,
application/x-www-form-urlencoded,
and
multipart/form-data
for
file
uploads.
The
server
may
enforce
size
limits
or
streaming
for
large
payloads.
resources
or
trigger
actions.
The
server's
response
often
includes
a
status
code
indicating
the
result
(for
example,
201
Created
for
a
new
resource,
200
OK,
202
Accepted,
or
204
No
Content)
and
may
include
a
body
containing
a
representation
or
an
identifier.
prevent
injection,
and
implementing
CSRF
protection
for
web
forms
when
cookies
are
used
for
authentication.
When
possible,
be
mindful
of
idempotence
and
design
endpoints
accordingly,
recognizing
that
POST
is
intended
for
actions
beyond
simple
retrieval.