1
0
mirror of https://github.com/httpie/cli.git synced 2025-08-10 22:42:05 +02:00

Make default HTTP headers case-insensitive

Cloase #644
This commit is contained in:
Jakub Roztocil
2018-02-22 12:52:57 +01:00
parent 05547224ce
commit 0f4dce98c7
3 changed files with 22 additions and 4 deletions

View File

@@ -3,6 +3,7 @@ import sys
import requests
from requests.adapters import HTTPAdapter
from requests.structures import CaseInsensitiveDict
from httpie import sessions
from httpie import __version__
@@ -106,9 +107,9 @@ def finalize_headers(headers):
def get_default_headers(args):
default_headers = {
default_headers = CaseInsensitiveDict({
'User-Agent': DEFAULT_UA
}
})
auto_json = args.data and not args.form
if args.json or auto_json: