Learn how to upload data to an API using Postdata.
PUT
or POST
methods.
The most common content types are:
application/json
: for content in JSON formatmultipart/form-data
: for uploading encoded filesapplication/octet-stream
: for uploading binary data directlyPOST
request must be of the content types application/x-www-form-encoded
and multipart/form-data
.
POST
HTTP method and set your API Endpoint URL.multipart/form-data
in the content-type dropdown.choose files
to select your file.multipart/form-data
multipart/form-data
, you can assign a specific content type to each parameter in Postdata. Here’s how:
multipart/form-data
from the Content Type dropdown.text/plain
for plain text, image/png
for a PNG image or application/json
for JSON data).application/octet-stream
content type. Follow these steps to upload binary data:
application/octet-stream
from the Content Type dropdown.