On Thu, 2017-05-25 at 18:05 +1000, Andrew Donnellan wrote:
> api/rest.rst gives an example of how to POST parameters to the
> PatchDetail
> view at api/patches/<patch_id>. However, the endpoint in question
> doesn't
> support POST - you need to use PUT or PATCH. Change it to PATCH.
> 
> Signed-off-by: Andrew Donnellan <andrew.donnel...@au1.ibm.com>

Yup - my bad.

Acked-by: Stephen Finucane <step...@that.guru>

and applied.

> ---
> 
> I have no idea whether it's *meant* to support POST...

We do not - we want/need Patchwork to do the parsing itself, rather
than allow arbitrary creation of "patches". It might make sense to
allow uploading raw mbox files (superuser only) in the future if people
request it, but this would be a different endpoint (/upload?).

> ---
>  docs/api/rest.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/docs/api/rest.rst b/docs/api/rest.rst
> index 1750913..8c8fd95 100644
> --- a/docs/api/rest.rst
> +++ b/docs/api/rest.rst
> @@ -155,7 +155,7 @@ parameters should be passed as form-encoded data:
>  
>  .. code-block:: shell
>  
> -    $ curl -X POST -F 'state=under-review' \
> +    $ curl -X PATCH -F 'state=under-review' \
>        'https://patchwork.example.com/api/patches/123'
>  
>  Authentication

_______________________________________________
Patchwork mailing list
Patchwork@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/patchwork

Reply via email to