Commit Graph

27 Commits

Author SHA1 Message Date
Jakub Roztocil
4c0d7d526f Added initial support for persistent sessions. 2012-08-17 23:30:47 +02:00
Jakub Roztocil
0b3bad9c81 Added initial support for persistent sessions. 2012-08-17 23:23:02 +02:00
Jakub Roztocil
4660da949f Fixed colorized output on Windows with Python 3.
Closes #87.
2012-08-17 06:35:18 +02:00
Jakub Roztocil
c01dd8d64a Added exit status for timed-out requests. 2012-08-09 05:24:58 +02:00
Jakub Roztocil
1fbe7a6121 Improved --debug. 2012-08-07 14:50:51 +02:00
Jakub Roztocil
dd2c89412c Compatibility with Requests 0.13.6. 2012-08-07 00:07:04 +02:00
Jakub Roztocil
44e409693b Set JSON Content-Type only with data even with -j. 2012-08-06 22:14:52 +02:00
Jakub Roztocil
4e58a3849a Added exit status constants, cleaned up main(). 2012-08-04 19:22:50 +02:00
Jakub Roztocil
94c77c9bfc Improved password prompt. 2012-08-04 17:04:36 +02:00
Jakub Roztocil
c7657e3c4b Streamed terminal output
`--stream` can be used to enable streaming also with `--pretty` and to ensure
a more frequent output flushing.
2012-08-04 16:35:31 +02:00
Jakub Roztocil
4b1a04e5ed Fixed error handling. 2012-08-02 04:33:43 +02:00
Jakub Roztocil
e045ca6bd8 Cleanup, CHANGELOG 2012-08-01 23:51:30 +02:00
Jakub Roztocil
52e46bedda Take advantage of streaming.
It's now possible to download huge files with HTTPie, and it's often faster than curl and wget!
2012-08-01 23:21:52 +02:00
Jakub Roztocil
67ad5980b2 Don't fetch the response body unless needed.
E.g., this will only read the response headers but won't download the
whole file:

    http GET --headers example.org/big-file.avi

The request method is respected (i.e., it doesn't switch to HEAD like
cURL does).
2012-08-01 21:31:06 +02:00
Jakub Roztocil
90d34ffd0d Added tests for binary request data. 2012-08-01 00:52:30 +02:00
Jakub Roztocil
923a8b71bd Revorked output
Binary now works everywhere. Also added `--output FILE` for Windows.
2012-07-30 10:58:16 +02:00
Jakub Roztocil
edf87c3392 Consistent request-response separators. 2012-07-29 06:59:51 +02:00
Jakub Roztocil
098e1d3100 Fixed multipart requests output; binary support.
* Bodies of multipart requests are correctly printed (closes #30).
* Binary requests and responses should always work (they are also suppressed
  for terminal output). So things like this work::

     http www.google.com/favicon.ico > favicon.ico
2012-07-28 05:50:12 +02:00
Jakub Roztocil
a8ddb8301d Default to https:// if invoked as `https'. 2012-07-27 18:08:33 +02:00
Jakub Roztocil
f45cc0eec0 Added docstrings, refactored input. 2012-07-26 07:23:00 +02:00
Jakub Roztocil
26a76e8243 Clean-up 2012-07-26 00:50:39 +02:00
Jakub Roztocil
7af08b6faa Allow multiple fields with the same name.
Applies to form data and URL params:

    http -f url a=1 a=2
    http url a==1 a==2
2012-07-24 17:00:02 +02:00
Jakub Roztocil
9944def703 Switched to "==" a the separator for URL params.
Also refactored item escaping.
2012-07-24 14:56:53 +02:00
Jakub Roztocil
2646ebaaed Replaced --ignore-http-status with --check-status.
The default behaviour now is to exit with 0 on HTTP errors
unless --check-status is set.
2012-07-24 01:09:14 +02:00
Jakub Roztocil
0572158ba1 Added exit codes for HTTP 3xx, 4xx, 5xx (3, 4, 5).
Also added `--ignore-http-status` to ensure 0 exit status.

HTTP 3xx result in 0 exit status when `--allow-redirects` is set.
2012-07-23 19:40:50 +02:00
Jakub Roztocil
0a673613ef Fixed colorama initialization (#36). 2012-07-21 15:08:28 +02:00
Jakub Roztocil
87042f65c9 Added models.Environment().
Refactoring and general cleanup.
2012-07-21 03:14:01 +02:00