Skip to content
Myr

Reverting redirect examples back to intended URLs

Before adoption: this commit came in with the history the project adopted, so no landing records it.

A find/replace from a few weeks ago made the redirection sample not demonstrate redirection anymore

authored by Rich Abdill · committed by GitHub · parent d2962f1 · Browse files · 1 file+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+3 added−3 removed

  • other:+3 added−3 removed

1 file+3 added−3 removed

modified:docs/user/quickstart.rst+3 added-3 removed
479 unmodified lines
480response.481482For example, GitHub redirects all HTTP requests to HTTPS::483484 >>> r = requests.get('https://github.com/')484 >>> r = requests.get('http://github.com/')485486 >>> r.url487 'https://github.com/'488
6 unmodified lines
495496If you're using GET, OPTIONS, POST, PUT, PATCH or DELETE, you can disable497redirection handling with the ``allow_redirects`` parameter::498499 >>> r = requests.get('https://github.com/', allow_redirects=False)499 >>> r = requests.get('http://github.com/', allow_redirects=False)500501 >>> r.status_code502 301503
1 unmodified line
505 []506507If you're using HEAD, you can enable redirection as well::508509 >>> r = requests.head('https://github.com/', allow_redirects=True)509 >>> r = requests.head('http://github.com/', allow_redirects=True)510511 >>> r.url512 'https://github.com/'513
49 unmodified lines