On Wed, 18 Dec 2019 04:52:33 +1100
Chris Angelico <ros...@gmail.com> wrote:

> On Wed, Dec 18, 2019 at 4:45 AM <mus...@posteo.org> wrote:
> > BTW, the canonical way to upload files via http is PUT, not POST.
> > You might want to look into that, but here it is off-topic.  
> 
> Citation needed.

https://tools.ietf.org/html/rfc2616#page-55
        
> Plenty of file uploads are done through POST
> requests.

Of course. Both work. It's just that the OP wanted to "upload a large
binary file" using curl and in such cases I find that PUT can make for
a cleaner, simpler interface. 

> Are you talking specifically about a RESTful API? Because
> that's only one of many patterns you can follow.

Sure. It's just that people sometimes aren't even aware of http
methods besides GET and POST, and there's a chance for the OP
to investigate this and maybe to find that PUT fits his needs better
than POST in this case.
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to