...
Blok kódu | ||
---|---|---|
| ||
POST /api/upload HTTP/1.1 Content-Type: multipart/form-data; boundary=----BoundaryIdentificatorkTrZ Content-Length: 205 Cookie: session=f3a78dd4e51e7 ------BoundaryIdentificatorkTrZu0gW Content-Disposition: form-data; name="json" {"name":"firmware"} ------BoundaryIdentificatorkTrZu0gW Content-Disposition: form-data; name="file" filename="fw.bin" Content-Type: application/octet-stream (… binary file data …) ------BoundaryIdentificatorkTrZ-- |
UrnUrn: /api/upload
Method: Metoda: POST
Request header: Cookie: session - actual session value.
Request type: multipart/form-data
Multipart items:
Poznámka |
---|
|
item: name="json":
A string item with the json structure.
Json schema for multipart
...
item "json":
Blok kódu { "$schema": "http://json-schema.org/draft-07/schema#", "title": "upload - request", "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ], "additionalProperties": false }
- item: name="file":
Binary/text file data to send.