"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpie/client.py" between
httpie-3.0.0.tar.gz and httpie-3.0.1.tar.gz

About: HTTPie is a command line HTTP client, a user-friendly cURL replacement, with the goal to make CLI interaction with web services as human-friendly as possible.

client.py  (httpie-3.0.0):client.py  (httpie-3.0.1)
import argparse import argparse
import http.client import http.client
import json import json
import sys import sys
from contextlib import contextmanager from contextlib import contextmanager
from time import monotonic
from typing import Any, Dict, Callable, Iterable from typing import Any, Dict, Callable, Iterable
from urllib.parse import urlparse, urlunparse from urllib.parse import urlparse, urlunparse
import requests import requests
# noinspection PyPackageRequirements # noinspection PyPackageRequirements
import urllib3 import urllib3
from . import __version__ from . import __version__
from .adapters import HTTPieHTTPAdapter from .adapters import HTTPieHTTPAdapter
from .context import Environment from .context import Environment
from .cli.dicts import HTTPHeadersDict from .cli.dicts import HTTPHeadersDict
skipping to change at line 109 skipping to change at line 110
send_kwargs_merged = requests_session.merge_environment_settings( send_kwargs_merged = requests_session.merge_environment_settings(
url=prepared_request.url, url=prepared_request.url,
**send_kwargs_mergeable_from_env, **send_kwargs_mergeable_from_env,
) )
with max_headers(args.max_headers): with max_headers(args.max_headers):
response = requests_session.send( response = requests_session.send(
request=prepared_request, request=prepared_request,
**send_kwargs_merged, **send_kwargs_merged,
**send_kwargs, **send_kwargs,
) )
response._httpie_headers_parsed_at = monotonic()
expired_cookies += get_expired_cookies( expired_cookies += get_expired_cookies(
response.headers.get('Set-Cookie', '') response.headers.get('Set-Cookie', '')
) )
response_count += 1 response_count += 1
if response.next: if response.next:
if args.max_redirects and response_count == args.max_redirects: if args.max_redirects and response_count == args.max_redirects:
raise requests.TooManyRedirects raise requests.TooManyRedirects
if args.follow: if args.follow:
prepared_request = response.next prepared_request = response.next
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)