summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Velghe <kevin@paretje.be>2020-12-21 11:47:47 +0100
committerGitHub <noreply@github.com>2020-12-21 11:47:47 +0100
commit02971b938de2b2d6e4cd79baa1c95e3e824b1a63 (patch)
tree0fb24f04a86fa9d381fb0ae6382a191c8390032f
parentf7e77efe4b63aae4bc833883ecbba8684396e367 (diff)
Fix documentation on file upload (#1000)
As documented later on in "File upload forms", the correct syntax to set the mimetype of the upload is `field@file;type=filetype`
-rw-r--r--README.rst56
1 files changed, 28 insertions, 28 deletions
diff --git a/README.rst b/README.rst
index 7d7036c0..06aafa42 100644
--- a/README.rst
+++ b/README.rst
@@ -462,34 +462,34 @@ their type is distinguished only by the separator used:
``:``, ``=``, ``:=``, ``==``, ``@``, ``=@``, and ``:=@``. The ones with an
``@`` expect a file path as value.
-+-----------------------+-----------------------------------------------------+
-| Item Type | Description |
-+=======================+=====================================================+
-| HTTP Headers | Arbitrary HTTP header, e.g. ``X-API-Token:123``. |
-| ``Name:Value`` | |
-+-----------------------+-----------------------------------------------------+
-| URL parameters | Appends the given name/value pair as a query |
-| ``name==value`` | string parameter to the URL. |
-| | The ``==`` separator is used. |
-+-----------------------+-----------------------------------------------------+
-| Data Fields | Request data fields to be serialized as a JSON |
-| ``field=value``, | object (default), to be form-encoded |
-| ``field=@file.txt`` | (with ``--form, -f``), or to be serialized as |
-| | ``multipart/form-data`` (with ``--multipart``). |
-+-----------------------+-----------------------------------------------------+
-| Raw JSON fields | Useful when sending JSON and one or |
-| ``field:=json``, | more fields need to be a ``Boolean``, ``Number``, |
-| ``field:=@file.json`` | nested ``Object``, or an ``Array``, e.g., |
-| | ``meals:='["ham","spam"]'`` or ``pies:=[1,2,3]`` |
-| | (note the quotes). |
-+-----------------------+-----------------------------------------------------+
-| Fields upload fields | Only available with ``--form, -f`` and |
-| ``field@/dir/file`` | ``--multipart``. |
-| ``field@file;type`` | For example ``screenshot@~/Pictures/img.png``, or |
-| | ``'cv@cv.txt;text/markdown'``. |
-| | With ``--form``, the presence of a file field |
-| | results in a ``--multipart`` request. |
-+-----------------------+-----------------------------------------------------+
++------------------------------+---------------------------------------------------+
+| Item Type | Description |
++==============================+===================================================+
+| HTTP Headers | Arbitrary HTTP header, e.g. ``X-API-Token:123``. |
+| ``Name:Value`` | |
++------------------------------+---------------------------------------------------+
+| URL parameters | Appends the given name/value pair as a query |
+| ``name==value`` | string parameter to the URL. |
+| | The ``==`` separator is used. |
++------------------------------+---------------------------------------------------+
+| Data Fields | Request data fields to be serialized as a JSON |
+| ``field=value``, | object (default), to be form-encoded |
+| ``field=@file.txt`` | (with ``--form, -f``), or to be serialized as |
+| | ``multipart/form-data`` (with ``--multipart``). |
++------------------------------+---------------------------------------------------+
+| Raw JSON fields | Useful when sending JSON and one or |
+| ``field:=json``, | more fields need to be a ``Boolean``, ``Number``, |
+| ``field:=@file.json`` | nested ``Object``, or an ``Array``, e.g., |
+| | ``meals:='["ham","spam"]'`` or ``pies:=[1,2,3]`` |
+| | (note the quotes). |
++------------------------------+---------------------------------------------------+
+| Fields upload fields | Only available with ``--form, -f`` and |
+| ``field@/dir/file`` | ``--multipart``. |
+| ``field@file;type=filetype`` | For example ``screenshot@~/Pictures/img.png``, or |
+| | ``'cv@cv.txt;type=text/markdown'``. |
+| | With ``--form``, the presence of a file field |
+| | results in a ``--multipart`` request. |
++------------------------------+---------------------------------------------------+
Note that data fields aren’t the only way to specify request data: