Commit Graph

536 Commits

Author SHA1 Message Date
Marc Abramowitz
86ebb9b741 compat.py: Add pragma no covers
Cuz this is a lot of version-specific stuff and it can be confusing to have different coverage per version, especially with coveralls.
2015-02-10 06:54:59 -08:00
Jakub Roztocil
a786f17997 1.0.0-dev 2015-02-07 17:04:33 +01:00
Jakub Roztocil
753a8d04e4 v0.9.1 2015-02-07 17:04:13 +01:00
Jakub Roztocil
3ff03524ff HTTP/2 has no minor versions.
https://github.com/jakubroztocil/httpie-http2/issues/1
2015-02-07 16:31:42 +01:00
Jakub Roztocil
9682f955b5 Handle HTTP/2 responses
https://github.com/jakubroztocil/httpie-http2/issues/1#issuecomment-73301801
2015-02-06 21:13:57 +01:00
Jakub Roztocil
996e314482 Cleanup 2015-02-05 15:55:20 +01:00
Jakub Roztocil
687a6a734d Added support for transport adapter plugins
#276, #298
2015-02-05 15:25:00 +01:00
Jakub Roztocil
b125ce5eae Allow custom URL schemes
Closes #299

See also #276
2015-02-05 14:35:34 +01:00
Jakub Roztocil
530d6c5e27 1.0.0-dev 2015-01-31 13:22:17 +01:00
Jakub Roztocil
12f2d99bfd Added test client SSL certs 2015-01-23 23:56:08 +01:00
Jakub Roztocil
df07927843 --certkey is now --cert-key 2015-01-23 23:54:27 +01:00
Jakub Roztocil
d3d78afb6a Pypy3 (2.4.0) curses bug workaround. 2015-01-23 22:19:02 +01:00
Jakub Roztocil
25b1be7c8a Work around missing object_pairs_hook in Python 2.6 2015-01-23 22:04:42 +01:00
Jakub Roztocil
22c993bab8 Merge branch 'fix-268' of https://github.com/asnelzin/httpie into asnelzin-fix-268 2015-01-23 21:45:09 +01:00
Jakub Roztocil
b2ec4f797f Exit with 0 for --version and --help (closes #293). 2015-01-19 15:39:46 +01:00
Alexander Nelzin
a2b12f75ea Fixed and added test for JSON properties order. 2014-11-13 23:56:05 +03:00
Jakub Roztocil
0481957715 Fixed multiple uploads with the same field name
Closes #267
2014-10-20 14:41:48 +02:00
Jakub Roztocil
c301305a59 Cleanup. 2014-10-20 14:41:48 +02:00
Jakub Roztocil
2078ece95a Cleanup 2014-10-20 14:41:48 +02:00
Dennis Brakhane
f1cd289d51 Fallback to JSON highlighting if subtype contains json
Some JSON based formats like JSON Home Documents[1] don't
use a '+json' suffix, but simply contain json in their
MIME type. Also, some servers might use (outdated)
types like 'application/x-json'.

The JSON formatter can already handle those cases,
but the highlighter was ignoring them.

This commit will let the highlighter choose the JSON
lexer if no other lexer could be found and the MIME subtype
contains 'json'

[1] http://tools.ietf.org/html/draft-nottingham-json-home-03
2014-09-25 00:10:06 +02:00
Jakub Roztocil
58b51a8277 Improved terminal color depth detection via curses
Closes #244
2014-09-08 07:46:53 +02:00
Jakub Roztocil
b0effe07d9 Fixed --output=/dev/null on Linux
Closes #252
2014-09-07 10:22:21 +02:00
Jakub Roztocil
5084f18568 '\' only escapes separator characters in req-items
It makes easier to work with Windows paths.

Closes #253, #254
2014-09-05 18:36:23 +02:00
Jakub Roztocil
1035710956 Added RequestItems named tuple for convenience. 2014-09-05 07:51:35 +02:00
Jakub Roztocil
ca36f1de04 Handle empty passwords in URL credentials
Closes #242
2014-07-18 13:39:47 +02:00
Jakub Roztocil
0f96348fd1 Cleanup 2014-07-18 13:39:47 +02:00
Jakub Roztocil
2a72ae23d5 Run tests against local httpbin instance via pytest-httpbin. 2014-06-28 16:38:41 +02:00
Jakub Roztocil
040d981f00 Fixed custom Host
Closes #235
2014-06-28 13:24:14 +02:00
Jakub Roztocil
8e170b059c Fixed tests. 2014-06-03 19:45:57 +02:00
Jakub Roztocil
e4c68063b9 Converted built-in formatters to formatter plugins.
Still work in progress and the API should be considered private for now.
2014-05-12 19:12:39 +02:00
Jakub Roztocil
858555abb5 Make sure session and default headers play nice
Before: headers = default + args + session
Now:    headers = default + session + args

Fixes #180
2014-05-08 12:27:50 +01:00
Jakub Roztocil
d9eca19b8f New URL. 2014-05-05 21:17:23 +02:00
Jakub Roztocil
faec00fd99 Improve support for 'type/subtype+suffix' mime types in the colors output formatter.
E.g.:
* application/ld+json
* application/hal+json

Closes #189, #206
2014-04-28 10:08:03 +02:00
Jakub Roztocil
0e6875bf83 Handle HTTP 0.9 in response when formatting version.
Closes #170
2014-04-28 00:08:20 +02:00
Jakub Roztocil
bd50a6adb1 Moved .directory from BaseConfigDict to Config.
Closes #200
2014-04-27 23:12:48 +02:00
Jakub Roztocil
05db75bdb1 Modularized output, refactoring
Making it ready for output formatting plugin API.
2014-04-27 21:58:00 +02:00
Jakub Roztocil
c06598a0c4 Cleanup 2014-04-27 18:27:44 +02:00
Jakub Roztocil
87806acc56 Cleanup 2014-04-26 23:06:39 +02:00
Jakub Roztocil
43bc6d0c98 Fixed and added tests for --verbose with unicode headers. 2014-04-26 20:10:15 +02:00
Jakub Roztocil
0bd218eab0 Cleanup 2014-04-26 19:32:08 +02:00
Jakub Roztocil
a3352af1d4 Added support and tests for unicode support in sessions. 2014-04-26 18:16:30 +02:00
Jakub Roztocil
467d126b6c Python 3 unicode fixes. 2014-04-26 17:35:26 +02:00
Jakub Roztocil
282cc455e3 Avoid "TypeError: keyword arguments must be strings" on Python 3.3. 2014-04-26 15:18:38 +02:00
Jakub Roztocil
56d33a8e51 Fix Windows branch. 2014-04-26 15:10:39 +02:00
Jakub Roztocil
15e62ad26d Implemented more robust unicode handling.
* Immediatelly convert all args from `bytes` to `str`.
* Added `Environment.stdin_encoding` and `Environment.stdout_encoding`
* Allow unicode characters in HTTP headers and basic auth credentials
  by encoding them using UTF8 instead of latin1 (#212).
2014-04-26 15:07:31 +02:00
Jakub Roztocil
b10d973019 Removed unused import. 2014-04-25 12:53:02 +02:00
Jakub Roztocil
af4aa3a761 Test improvements. 2014-04-25 12:18:35 +02:00
Jakub Roztocil
f02169ea71 Added Python 2.6 compatible OrderedDict
To preserver ordr of headers, parameters, etc.
2014-04-24 19:57:19 +02:00
Jakub Roztocil
e5d758e4ce More tests. 2014-04-24 19:32:55 +02:00
Jakub Roztocil
bdea7be456 Added tests for --debug and --help. 2014-04-24 19:32:55 +02:00
Jakub Roztocil
3d079942f4 Finished pytest migration. 2014-04-24 19:32:55 +02:00
Jakub Roztocil
6071fff4af Refactored tests into smaller modules. 2014-04-24 14:07:31 +02:00
Jakub Roztočil
733771fd9e Merge pull request #172 from unsignedint/master
process XML data before pretty-printing to trim whitespace
2014-03-18 19:44:16 +01:00
Jakub Roztocil
29877bc8ad Updated installation instructions. 2014-03-04 18:24:32 +01:00
Jakub Roztocil
b01906a45c Fixed ZeroDivisionError in download summary.
Closes #202
2014-02-18 13:06:18 +01:00
Matthias Lehmann
a3aae12d9c rename -ssl-cert and --ssl-key to --cert and --certkey 2014-02-05 12:50:40 +01:00
Matthias Lehmann
d4363a560d rename existing_file to readable_file_arg and move to input 2014-01-29 18:02:06 +01:00
Matthias Lehmann
b9d7220b10 check --ssl-cert and --ssl-key to be files 2014-01-29 15:54:19 +01:00
Matthias Lehmann
14583a2efa add support for client SSL certificate and key 2014-01-28 16:16:48 +01:00
Jakub Roztocil
f1224da526 v0.8.0 2014-01-25 15:11:38 +01:00
Jakub Roztocil
e0cc63c7eb Cleanup 2014-01-25 15:09:28 +01:00
Jakub Roztocil
52dd6adaa3 Updated README. 2014-01-25 15:04:15 +01:00
Jakub Roztocil
1aa77017d5 Catch UnicodeDecodeError when embedding file via =@ or :=@. 2014-01-25 14:57:19 +01:00
Jakub Roztočil
b1074ccb4f Merge pull request #191 from solidsnack/wip-no-auth-in-host-header
Expunge user:pass@... from Host header.
2014-01-08 02:28:19 -08:00
Thomas LÉVEIL
a31d552d1c fix typo 2014-01-07 14:04:13 +01:00
Jason Dusek
5a037b2e13 Expunge user:pass@... from Host header.
In verbose mode, the basic auth user and password would show up in colored
output reporting the Host header, as reported in
https://github.com/jkbr/httpie/issues/169
2014-01-06 19:12:33 +00:00
Rav Chandra
bee10e5eed replace XML processor with ElementTree with custom indentation 2013-10-16 13:07:53 +13:00
Rav Chandra
bcdf194bae process XML data before pretty-printing to trim whitespace 2013-10-16 12:33:19 +13:00
Nathan LaFreniere
4fe3deb9d9 add self to authors, update changelog, and mention shorthand in --help output 2013-10-09 13:21:14 -07:00
Nathan LaFreniere
8a52bef559 make shorthand parsing more robust, add unit tests and documentation 2013-10-09 11:32:41 -07:00
Nathan LaFreniere
711168a899 allow :port style shorthand 2013-10-08 22:41:38 -07:00
Jakub Roztocil
81c99886fd Update --proxy examples to include URLs to work with Requests v2.0.0.. 2013-09-25 22:02:29 +02:00
Jakub Roztocil
2e535d8345 Fixed password prompt. 2013-09-25 00:17:50 +02:00
Jakub Roztocil
0bcd4d2fb0 Fixed a bytes/str issue for Python 3. 2013-09-25 00:00:17 +02:00
Jakub Roztocil
d5bc564e4f Allow embeding text (=@) and JSON (:=@) files content into request data fields. 2013-09-24 23:41:18 +02:00
Jakub Roztocil
54c5c3d82b 0.7.1 2013-09-24 21:57:29 +02:00
Jakub Roztocil
2a6514eb5d Update to requests 2.0.0
Closes #140.
2013-09-24 21:49:43 +02:00
Jakub Roztocil
22c2cc6465 Removed unused import. 2013-09-24 20:30:54 +02:00
Jakub Roztocil
2265edf05e Cleanup 2013-09-24 20:15:19 +02:00
Jakub Roztocil
29f6b6a2a9 Improved Content-Disposition parsing for --download mode
Closes #168.
2013-09-24 19:50:37 +02:00
Jakub Roztocil
2acb303552 Added support for auth plugins. 2013-09-21 23:46:15 +02:00
Jakub Roztocil
f7b703b4bf Added --ignore-stdin
Closes #150
2013-08-23 10:57:17 +02:00
Jakub Roztocil
00de49f4c3 Cleanup 2013-08-18 00:59:10 +02:00
Jakub Roztocil
67496162fa Improved --help output. 2013-08-10 11:56:19 +02:00
Jakub Roztocil
383dba524a Print error when download is interrupted by server
Close #147
2013-07-07 17:00:03 +02:00
Jakub Roztocil
809a461a26 v0.6.0 2013-06-03 12:19:43 +02:00
Jakub Roztocil
172df162b3 Added XML formatting to CHANGELOG. 2013-06-02 20:27:58 +02:00
Jakub Roztocil
1bad62ab0e Handle unicode when formatting XML. 2013-06-02 20:25:36 +02:00
Jakub Roztocil
8d302f91f9 Merge branch 'master' of git://github.com/jargonjustin/httpie into jargonjustin-master 2013-06-02 20:14:51 +02:00
Jakub Roztocil
5af88756a6 Fixed download ETA for Python 2.6. 2013-05-14 12:49:29 +02:00
Jakub Roztocil
7f624e61b5 Use Thread instead of Timer for progress reporting. 2013-05-14 12:49:03 +02:00
Jakub Roztocil
6e848b3203 cleanup 2013-05-14 12:14:08 +02:00
Jakub Roztocil
87c59ae561 Added anonymous sessions (--session=/file/path.json). 2013-05-13 14:47:44 +02:00
Jakub Roztocil
76eebeac2a 0.6.0-dev 2013-05-13 12:42:16 +02:00
Jakub Roztocil
5b9cbcb530 v0.5.1 2013-05-13 12:40:25 +02:00
Jakub Roztocil
e09b74021c Ignore Content-* and If-* request headers.
Those headers are not stored in sessions anymore.

Closes #141.
2013-05-13 11:54:49 +02:00
Jakub Roztocil
71e7061014 v0.5.0 2013-04-27 12:03:38 -03:00
Jakub Roztocil
bc756cb6a2 Cleanup 2013-04-27 11:57:13 -03:00
Jakub Roztocil
1fc8396c4b Stop the progres reporter thread on error. 2013-04-16 04:55:45 -03:00
Jakub Roztocil
6c3b983c18 Tests 2013-04-15 00:56:47 -03:00
Jakub Roztocil
cfa7199f0b Added a simple download test. 2013-04-13 15:34:31 -03:00
Jakub Roztocil
5a1177d57e Fixed downloads with no Content-Length. 2013-04-13 14:50:46 -03:00
Jakub Roztocil
c63a92f9b7 Cleanup 2013-04-12 22:02:34 -03:00
Jakub Roztocil
d17e02792b Fixed length progress bar. 2013-04-12 21:49:27 -03:00
Jakub Roztocil
fc4f70a900 Colorize stderr on Windows. 2013-04-12 17:15:21 -03:00
Jakub Roztocil
1681a4ddd0 TODOs 2013-04-12 15:27:26 -03:00
Jakub Roztocil
289e9b844e Fixed Content-Type retrieval for Python 3. 2013-04-12 14:07:21 -03:00
Jakub Roztocil
4d84d77851 Cleanup 2013-04-12 13:09:57 -03:00
Jakub Roztocil
1b98505537 Validate download options before setting up streams. 2013-04-12 11:59:23 -03:00
Jakub Roztocil
d32acfe2fa Only use Range when already have a partial download. 2013-04-12 11:56:05 -03:00
Jakub Roztocil
38206e9e92 Cleanup 2013-04-12 11:26:42 -03:00
Jakub Roztocil
341272db1e Added support for output redirection with --download (#104). 2013-04-12 11:04:14 -03:00
Jakub Roztocil
9d043eb745 Used Content-Disposition filename (#104). 2013-04-12 10:19:49 -03:00
Jakub Roztocil
40bd8f65af Handle KeyboardInterrupt while --download'ing (#104). 2013-04-12 09:08:19 -03:00
Jakub Roztocil
347653b369 Performance and progress bar improvements.
#104
2013-04-12 08:59:33 -03:00
Jakub Roztocil
ebfce6fb93 Improved progress bar (#104). 2013-04-11 18:51:21 -03:00
Jakub Roztocil
674acfe2c2 Cleanup 2013-04-11 16:23:15 -03:00
Jakub Roztocil
7ccdece39f Cleanup 2013-04-11 04:00:41 -03:00
Jakub Roztocil
e53dcba03e Added Content-Range parsing tests.
#104
2013-04-11 03:49:01 -03:00
Jakub Roztocil
486657afa3 Improved Content-Range parsing.
#104
2013-04-11 03:24:59 -03:00
Jakub Roztocil
599bc0519f Download resume improvements.
- Set correct Range
- Validate respnse status
- Validate Content-Range

 #104
2013-04-11 02:29:10 -03:00
Jakub Roztocil
21613faa5a Progress bar update 2013-04-10 13:07:05 -03:00
Jakub Roztocil
36bc64e02f Cleanup. 2013-04-10 12:53:25 -03:00
Jakub Roztocil
6e5c696ac9 --json with no data sets Content-Type as well
Closes #137
2013-04-02 11:07:14 -03:00
Jakub Roztocil
9b2a293e6e Progress on --download. 2013-03-24 11:23:18 -03:00
Jakub Roztocil
bffaee13ff Formatting 2013-03-20 12:07:23 -03:00
asavchyn
631c54b711 Fixed PyPy cookie updating issue 2013-03-20 11:45:56 +02:00
Jakub Roztocil
99f82bbd32 Handle downloads with no Content-Length. 2013-03-07 13:32:48 -03:00
Jakub Roztocil
6f64b437b7 Fixed streaming (closes #133) 2013-03-07 12:42:29 -03:00
Jakub Roztocil
7774eac3df Fixed unique suffix placement for URLs with a file extension. 2013-03-03 22:35:01 -03:00
Jakub Roztocil
8e6c765be2 Initial --download implementation (#104).
Closes #127
2013-03-03 22:17:09 -03:00
Jakub Roztocil
f0c42cd089 v0.4.1 2013-02-26 14:37:09 +01:00
Jakub Roztocil
be0b2f21d2 v0.4.0 2013-02-22 13:52:50 +01:00
Jakub Roztocil
5cc5b13555 Removed the management command.
It means that:

    httpie session list
    httpie session edit
    ...

are gone.

It has never been part of a stable release, and since it wasn't
a very useful feature, it's beeing removed now to avoid feature creep.
2013-02-22 13:27:26 +01:00
Jakub Roztocil
093dab5896 Multiple headers TODO. 2013-02-22 13:18:18 +01:00
Jakub Roztocil
5f42a21cfb Simplified stored session cookie data. 2013-01-22 20:03:28 +01:00
Jakub Roztocil
4c45f0d91f Session name escaping. 2013-01-22 20:02:39 +01:00
Jakub Roztocil
238b2e0441 Fixing tests for Travis. 2013-01-04 03:05:36 +01:00
Jakub Roztocil
a93d57b58b Fixed request/response session cookies.
Closes #113.
2013-01-04 02:59:05 +01:00
Jakub Roztocil
79c412064a Python 3.3 fixes. 2013-01-03 15:19:21 +01:00
Jakub Roztocil
0ae9d7af58 Compatibility with requests v1.0.4 (requests URL params). 2013-01-03 14:42:17 +01:00
Jakub Roztocil
1481749c22 Use urlsplit instead of urlparse.
Closes #118.
2013-01-03 14:12:27 +01:00
Jakub Roztocil
d84d94dd55 Clean up 2013-01-03 13:49:41 +01:00
Jakub Roztocil
fe16f425a9 Require Requests v1.0.3. 2012-12-19 12:31:01 +01:00
Jakub Roztocil
e5edb66ae8 Requests v1.0: Fixed request body access. 2012-12-19 11:37:52 +01:00
Justin Bonnar
2e57c080fd Pretty print XML 2012-12-17 13:21:38 -08:00
Jakub Roztocil
1766dd8291 Requests 1.0: session cookies. 2012-12-17 17:18:18 +01:00
Jakub Roztocil
69e26b8bc8 Requests 1.0: prefetch; default_headers. 2012-12-17 17:02:27 +01:00
Jakub Roztocil
9ec328ff6f Session commands. 2012-12-11 12:54:34 +01:00
Jakub Roztocil
f2d59ba6bd Improved --check-status + HTTP error + stdout redirect warning. 2012-12-05 05:27:11 +01:00
Jakub Roztocil
53caf6ae72 Cleanup 2012-12-05 05:06:06 +01:00
Jakub Roztocil
8175366f27 PEP8 2012-12-05 04:39:56 +01:00
Jakub Roztocil
18510a9396 Progress on httpie session *. 2012-12-01 18:16:00 +01:00
Jakub Roztocil
acf5f063c7 Typo 2012-12-01 16:52:23 +01:00
Jakub Roztocil
dd100c2cc4 Fixed -j & -v & redirected stdout. Closes #109. 2012-12-01 15:55:58 +01:00
Jakub Roztocil
4a24cd25b9 Clean up. 2012-12-01 15:20:14 +01:00
Jakub Roztocil
1c5fb89001 Output stream refactoring. 2012-11-09 15:49:23 +01:00
Jakub Roztocil
d87b2aa0e5 Added support for credentials in URL.
Closes #100 🍰
2012-11-08 22:29:54 +01:00
Jakub Roztocil
5d969852c7 Added --no-option's and made args more config-friendly. 2012-09-24 06:49:12 +02:00
Jakub Roztocil
e25d64a610 0.3.0 2012-09-21 05:50:01 +02:00
Jakub Roztocil
a41dd7ac6d Allow output redirection on Windows.
Closes #88.
2012-09-21 04:30:59 +02:00
Jakub Roztocil
4a6f32a0f4 Documented config.
Also renamed `default_content_type` to `implicit_content_type` .
2012-09-17 03:08:45 +02:00
Jakub Roztocil
548bef7dff Added tests for sessions. 2012-09-17 02:15:00 +02:00
Jakub Roztocil
6c2001d1f5 Use the HTTPIE_CONFIG_DIR environment variable. 2012-09-17 02:12:16 +02:00
Jakub Roztocil
4029dbf309 Added configuration file.
The "default_content_type" option can be set to "form".

Closes #91.
2012-09-17 00:37:36 +02:00
Jakub Roztocil
478d654945 Renamed --session-read to --session-read-only. 2012-09-17 00:01:49 +02:00
Jakub Roztocil
66bdbc3745 Cleanup. 2012-09-07 12:48:59 +02:00
Jakub Roztocil
316e3f45a9 Added --session-read for read-only sessions. 2012-09-07 12:38:52 +02:00
Jakub Roztocil
da0eb7db79 Renamed --allow-redirects to --follow. 2012-09-07 11:58:39 +02:00
Jakub Roztocil
9338aadd75 Cleanup 2012-09-05 20:22:08 +02:00
Simon Buchan
898408c20c Fix sessions for Windows
':' is invalid in a Windows path, and json needs output to support
write(str).
2012-09-04 15:53:27 +12:00
Jakub Roztocil
47de4e2c9c Sessions are now host-bound. 2012-08-19 04:58:14 +02:00
Jakub Roztocil
8a9cedb16e JSON session data, `httpie' management command. 2012-08-18 23:07:36 +02:00
Jakub Roztocil
ff9f23da5b Grouped arguments for a more user-friendly --help. 2012-08-18 06:12:44 +02:00
Jakub Roztocil
50810e5bd9 Include data directory location with --debug. 2012-08-18 04:45:29 +02:00
Jakub Roztocil
9b586b953b Use %APPDATA% for data on Windows. 2012-08-18 04:36:58 +02:00
Jakub Roztocil
149cbc1604 Fixed Solarized style unavailable on Windows.
#87.
2012-08-18 03:54:38 +02:00
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
1ed43c1a1e Semver-compatible versioning. 2012-08-17 21:24:34 +02:00
Jakub Roztocil
bf03937f06 Unified output processing options under --pretty.
* --pretty=none instead of --ugly
* --pretty=all instead of --pretty
* --pretty=colors instead of --colors
* --pretty=format instead of --format
2012-08-17 21:15:37 +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
a5522b8233 Revert "Iter body lines to avoid binary false positives."
This reverts commit b92a3a6d95.
2012-08-16 03:06:48 +02:00
Jakub Roztocil
b92a3a6d95 Iter body lines to avoid binary false positives.
#84
2012-08-13 23:33:25 +02:00
Jakub Roztocil
68640a81b3 Use CRLF for headers in the output. 2012-08-10 01:45:07 +02:00
Jakub Roztocil
c01dd8d64a Added exit status for timed-out requests. 2012-08-09 05:24:58 +02:00
Jakub Roztocil
22a10aec4a Added --colors and --format.
Closes #59 and #82.
2012-08-07 16:59:49 +02:00
Jakub Roztocil
07de32c406 Version fix. 2012-08-07 15:01:04 +02:00
Jakub Roztocil
1fbe7a6121 Improved --debug. 2012-08-07 14:50:51 +02:00
Jakub Roztocil
969b310ea9 v0.2.7 2012-08-07 00:12:47 +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
4615011f2e Sort headers by name when prettifying. 2012-08-03 00:58:01 +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
00d85a4b97 Fallback to media subtype if the type is uknown.
Closes #81.
2012-08-01 17:37:23 +02:00
Jakub Roztocil
90d34ffd0d Added tests for binary request data. 2012-08-01 00:52:30 +02:00
Jakub Roztocil
8905b4fc72 cleanup 2012-07-30 14:23:22 +02:00
Jakub Roztocil
4117d99dd0 Updated screenshot. 2012-07-30 12:37:59 +02:00
Jakub Roztocil
49604e7c29 Updated screenshot. 2012-07-30 12:29:56 +02:00
Jakub Roztocil
72d371c467 Updated screenshot. 2012-07-30 12:24:11 +02:00
Jakub Roztocil
e13f65ace1 Updated solarized and switched to Solarized256Style. 2012-07-30 12:11:16 +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
6eed0d92eb Better error messages. 2012-07-29 07:14:54 +02:00
Jakub Roztocil
edf87c3392 Consistent request-response separators. 2012-07-29 06:59:51 +02:00
Jakub Roztocil
f73bfea6b8 Validate "file fields (name@/path) require --form / -f". 2012-07-29 06:58:50 +02:00
Jakub Roztocil
16635870e3 Removed redundant decode/encode. 2012-07-29 03:52:24 +02:00
Jakub Roztocil
f5bc081fda Send filenames with multipart/form-data file uploads. 2012-07-28 13:24:44 +02:00
Jakub Roztocil
1efea59a8d Fixed typos. 2012-07-28 06:09:25 +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
a770d79aef v0.2.7dev 2012-07-26 10:03:34 +02:00
Jakub Roztocil
b53d483163 v0.2.6 2012-07-26 09:58:31 +02:00
Jakub Roztocil
f45cc0eec0 Added docstrings, refactored input. 2012-07-26 07:23:00 +02:00
Jakub Roztocil
851412c698 Improved error messages. 2012-07-26 03:16:42 +02:00
Jakub Roztocil
26a76e8243 Clean-up 2012-07-26 00:50:39 +02:00
Jakub Roztocil
f5cfd0143b Ensure that full querystring is printent with -v.
The `key==value` parameters weren't included in the Request-Line URL.

Also added tests.
2012-07-25 14:32:57 +02:00
Jakub Roztocil
76ebe7c6db Short option for --headers is now -h.
-t has been removed, for usage use --help
2012-07-24 17:17:26 +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
ced6e33230 Fixed tests. 2012-07-21 03:22:47 +02:00
Jakub Roztocil
87042f65c9 Added models.Environment().
Refactoring and general cleanup.
2012-07-21 03:14:01 +02:00
Jakub Roztocil
57fc606f6b Changed default --print to "b" if stdout piped.
If the output is piped to another program or redirected to a file,
the new default behaviour is to only print the response body.
(It can still be overriden via the ``--print`` flag.)
2012-07-20 23:43:04 +02:00
Jakub Roztocil
16f23d8147 Improved highlighting of HTTP headers.
Closes #60.
2012-07-20 21:58:41 +02:00
Jake Basile
76a3125153 Updated documentation for query string params. 2012-07-18 21:16:33 -05:00
Jake Basile
06ea36aaa4 Added the ability to pass query string parameters. 2012-07-18 20:44:09 -05:00
Jakub Roztocil
c2d70e2bb1 Clean up. 2012-07-17 07:01:30 +02:00
Jakub Roztocil
2dba176aa8 Added support for terminal colors under Windows.
Tested on Python 2.7 under Windows 7 with PowerShell and cmd.exe.

Closes #36
2012-07-17 04:06:13 +02:00
Jakub Roztocil
533a662651 0.2.6dev 2012-07-17 01:39:30 +02:00
Jakub Roztocil
1ce02ebbd5 0.2.5 (bugfixes) 2012-07-17 01:39:02 +02:00
Jakub Roztocil
f29c458611 Python 3 fixes. 2012-07-17 01:26:21 +02:00
Jakub Roztocil
2d7df0afb4 Fixed AttributeError in Content-Type vendor removal. 2012-07-17 01:11:43 +02:00
Jakub Roztocil
16a7d0a719 Fixed accidentally remove __licence__. 2012-07-17 01:11:01 +02:00
Jakub Roztocil
f42ee6da85 0.2.5dev 2012-07-17 00:45:20 +02:00
Jakub Roztocil
deeb7cbbac 0.2.4 (bad upload of 0.2.3 to pypi). 2012-07-17 00:44:25 +02:00
Jakub Roztocil
12f2fb4a92 Merge branch 'master' of github.com:jkbr/httpie 2012-07-17 00:38:41 +02:00
Jakub Roztocil
489bd64295 0.2.4dev 2012-07-17 00:37:53 +02:00
Jakub Roztocil
9b8cb42efd 0.2.3 2012-07-17 00:37:13 +02:00
Jakub Roztocil
2036337a53 Merge pull request #69 from jokull/master
Prettify vendor+json and vendor+xml Content-Type responses
2012-07-16 15:27:50 -07:00
Oleg Churkin
5a82c79fdf Now non-ascii symbols displayed correctly in the output (not as escape sequences). 2012-07-17 00:08:52 +02:00
Jakub Roztocil
05b321d38f Better wording. 2012-07-17 00:06:13 +02:00
Jakub Roztocil
681b652bf9 Allow stdin data with password prompt; added tests
Closes #70
2012-07-16 23:41:27 +02:00