Commit Graph

98 Commits

Author SHA1 Message Date
Jakub Roztocil
1dc67a6a38 Allow bypassing .netrc with --ignore-netrc (close #730) 2019-08-31 12:09:17 +02:00
Jakub Roztocil
0f654388fc Python 3 annotations, super(), pathlib, etc. 2019-08-30 15:14:51 +02:00
Jakub Roztocil
63df735fef Update links to HTTPS 2019-08-30 10:07:01 +02:00
Jakub Roztocil
ced9212c1f Allow stdin to be a closed fd #791 2019-08-29 13:39:42 +02:00
Jakub Roztocil
07da8ea852 Merge branch 'allow-closed-stdin' of https://github.com/mgsloan/httpie into mgsloan-allow-closed-stdin 2019-08-29 13:26:28 +02:00
Jakub Roztocil
8e04a24b90 Reintroduce $ https command alias with https:// as default scheme
Close #608
2019-08-29 13:08:02 +02:00
Jakub Roztocil
b3d2c1876e Python 2.7 support removal WIP 2019-08-29 08:53:56 +02:00
Michael Sloan
c5ca9d248e Allow stdin to be a closed fd
Before this change, the following invocation would not work

```
$ http http://neverhttps.com <&-
```

The "<&-" at the end closes the stdin fd. Specifically, it would fail with

```
  ...
  File "/home/mgsloan/.local/lib/python3.6/site-packages/httpie/context.py", line 26, in Environment
    stdin_isatty = stdin.isatty()
AttributeError: 'NoneType' object has no attribute 'isatty'
```

This can occur when httpie is being programmatically invoked, and may
as well be supported.
2019-07-17 23:02:49 -06:00
Mickaël Schoentgen
3a46149de1 Fix several ResourceWarning: unclosed file (#741)
Signed-off-by: Mickaël Schoentgen <contact@tiger-222.fr>
2019-02-04 10:00:30 +01:00
Vladimir Berkutov
a7d570916d #722: Add support for tls1.3 (#724)
* #722: Add support for tls1.3

* #722: Document the potential support for tls1.3
2018-11-02 14:57:53 +01:00
Jakub Roztocil
7917f1b40c Build fixes and clean-up
* reflect Python 3.7 release
* fix `pycodestyle` errors
* update `pycodestyle` config
* move `pytest` and `pycodestyle` config to `setup.cfg`
* add `make pycodestyle`
* add `make coveralls`
* etc.
2018-07-12 21:16:16 +02:00
Jakub Roztocil
7f5fd130c5 Start using dict comprehensions 2017-12-28 18:15:17 +01:00
Jakub Roztocil
ec899d70b7 Removed Python 2.6 support
* Travis CI doesn't support it anymore.
* It had EOL more than 4 years ago
2017-12-28 18:03:37 +01:00
James
0aab796960
Clarify error message 2017-11-13 07:23:52 -05:00
Jakub Roztocil
c948f98b05 Update links 2017-03-10 11:27:38 +01:00
Jakub Roztocil
2bf71af286 pep8 2016-11-23 23:36:46 +01:00
Jakub Roztocil
3f7ed35238 Add more plugin API tests 2016-11-23 23:09:45 +01:00
Jakub Roztocil
a49774d3ab Extend auth plugin API
This extends the `AuthPlugin` API by the following attributes:

* `auth_require`: set to `False` to make `--auth, -a` optional
* `auth_parse`: set to `False` to disable `username:password` parsing
  (access the raw value passed to `-a` via `self.raw_auth`).
* `prompt_password`: set to`False` to disable password prompt when
   no password provided (only relevant when `auth_parse == True`)

 These changes should be 100% backwards-compatible.

 What needs more testing is auth support in sessions.

Close #433
Close #431
Close #378
Ping teracyhq/httpie-jwt-auth#3
2016-11-23 22:02:12 +01:00
Jakub Roztocil
aab5cd9da0 PEP8. clean-up 2016-07-04 20:30:55 +02:00
Jakub Roztocil
1124d68946 Added --default-scheme <URL_SCHEME>
Closes #289
2016-07-02 12:47:02 +02:00
Jakub Roztočil
c3735d0422 Merge pull request #401 from lgarron/default-scheme
Add a --default-scheme argument.
2016-07-02 12:32:07 +02:00
Jakub Roztocil
5acbc904b7 Added the ability to unset headers
Closes #476
2016-07-02 11:50:30 +02:00
Jakub Roztocil
098257c0be Rename --print-others to --history-print. 2016-07-01 18:49:27 +02:00
Jakub Roztocil
6e1dbadff9 Replace --show-redirects with --all and add --print-others, -P
With --all, any intermediary requests/responses are shown (such as redirects
 or the initial unauthorized Digest auth request).

 The --print-others, -P option works like --print, -p, but only applies to
 intermediary requests/responses. The default behaviour is to inherit
 the value of -p.
2016-03-07 07:04:23 +08:00
Jakub Roztocil
20823c1702 Removed the "implicit_content_type" config option
If you used:

    "implicit_content_type": "form"

 You can achieve the the same result with:

     "default_options": ["--form"]

If you used:

    "implicit_content_type": "json"

 Then it's the default behaviour and it can be removed.

 In either case HTTPie will migrate your config file on the next invocation.
2016-03-03 17:14:39 +08:00
Jakub Roztocil
dc4da527db Added --ssl=<PROTOCOL_VERSION>
Closes #98
2016-03-02 12:12:05 +08:00
Jakub Roztocil
01ca7f0eb2 Ignore redirected stdout with --output, -o
This makes it easier to use HTTPie in cron jobs and scripts.

Closes #259
2016-03-01 20:24:50 +08:00
Jakub Roztocil
8c33e5e3d3 Parser => HTTPieArgumentParser 2016-02-28 19:01:54 +08:00
Jakub Roztocil
56f498c153 Detect Content Type of file uploaded in multipart/form-data request
Closes #271 #285 #398

This adds filename-based detection. It's still not possible to specify the
content type manually, though.
2016-02-28 15:49:01 +08:00
Marcin Szewczyk
59e22b16b8 When possible, guess the content-type of the file being sent
Refined PR #285 by rasky to pass all tests
2016-02-28 15:47:43 +08:00
Jakub Roztočil
c42bd0051a Merge pull request #396 from pathcl/master
PEP8 errors
2016-01-01 18:37:49 -03:00
Jakub Roztočil
8771d759fe Merge pull request #382 from konopski/master
[#381] Fixed --auth prompt on Windows
2016-01-01 18:18:23 -03:00
Lucas Garron
6259b5dd3b Add a --default-scheme argument. 2015-10-28 15:06:04 -07:00
Luis San Martin
45df860124 PEP8 errors 2015-10-22 14:32:16 -03:00
Lukasz Konopski
277da1ff93 str conversion 2015-10-21 21:57:06 +02:00
honorabrutroll
ed484c278b Change pretty option processor to only raise error when using output file 2015-10-04 17:06:00 -05:00
Lukasz Konopski
aec0f04f5d [#381] --auth fails on windows 2015-09-21 16:30:46 +02:00
Jakub Roztocil
2b51cb6687 Updated links II. 2015-07-03 18:55:45 +02:00
Jakub Roztocil
bc0d17c04c Added a PyPy incompatibility workaround. 2015-02-15 00:36:55 +01:00
Jakub Roztocil
b125ce5eae Allow custom URL schemes
Closes #299

See also #276
2015-02-05 14:35:34 +01:00
Jakub Roztocil
25b1be7c8a Work around missing object_pairs_hook in Python 2.6 2015-01-23 22:04:42 +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
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
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