-
Notifications
You must be signed in to change notification settings - Fork 796
POST api
John Crepezzi edited this page Jun 12, 2014
·
3 revisions
There are two ways to send data up to become a paste on a haste-server:
- POST: /documents
- Content-type: text/plain
- Request body: contents of paste
- Response: See below
- POST: /documents
- Content-type: multipart/form-data
- Request body: A multipart form data encoded body, with a single key named "data" which holds the paste
- Response: See below
NOTE: For more detail on the how multipart form bodies should be structured, see: http://www.w3.org/TR/html401/interact/forms.html#h-17.13.4
A JSON document (content-type: application/json
) containing a single Key-Value, ex:
{ "key": "as8fj2j2n" }