cli icon indicating copy to clipboard operation
cli copied to clipboard

Support 100 Continue

Open aseemk opened this issue 12 years ago • 5 comments

Hey there,

Really great work on HTTPie. I've come to love it a lot -- so much nicer than cURL. =)

Just chiming in w/ a feature request: it'd be great if HTTPie supported 100 Continue:

http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html

You probably already know what this is, but if not, a client can send an Expect: 100-continue request header, giving the server a chance to respond either with 100 Continue or a different, final status code -- before the client sends along the request body.

E.g. Amazon S3 recommends using this:

http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTRedirect.html

I've tried passing along this header myself, which "works" -- but HTTPie doesn't actually take that into account at all; it still sends the request body.

https://gist.github.com/aseemk/6116887

Thanks much for the consideration!

aseemk avatar Jul 30 '13 21:07 aseemk

@aseemk that's a limitation of requests which httpie uses and can't be fixed here until it is fixed there. Here's the corresponding issue. If you have insight into how that can be done, let us know!

sigmavirus24 avatar Jul 30 '13 23:07 sigmavirus24

Ah, got it. Thanks for the link! I'll chime in over there. =)

If you'd like to close this issue until that one is resolved, btw, please feel free.

aseemk avatar Jul 31 '13 00:07 aseemk

BTW https://github.com/psf/requests/issues/713 is closed

spencergibb avatar Apr 14 '20 15:04 spencergibb

@spencergibb correct. There's nothing that library or urllib3 can do to support this until Python's standard library stops ignoring/swallowing it whole and hiding it from them

sigmavirus24 avatar Apr 14 '20 15:04 sigmavirus24

Still blocked by https://bugs.python.org/issue1346874

Almad avatar Feb 03 '21 15:02 Almad