Skip to content
Myr

Fix syntax highlighting (#757)

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

Fixes syntax highlighting in quickstart documentation

authored by Francesco Pongiluppi · committed by Tom Christie · parent bdfabe1 · Browse files · 1 file+5 added−5 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+5 added−5 removed

  • other:+5 added−5 removed

1 file+5 added−5 removed

modified:docs/quickstart.md+5 added-5 removed
253 unmodified lines
254```255256Any successful response codes will simply return `None` rather than raising an exception.257258``` python258```python259>>> r.raise_for_status()260```261262## Response Headers
32 unmodified lines
295For large downloads you may want to use streaming responses that do not load the entire response body into memory at once.296297You can stream the binary content of the response...298299```299```python300>>> with httpx.stream("GET", "https://www.example.com") as r:301... for data in r.iter_bytes():302... print(data)303```304305Or the text of the response...306307```307```python308>>> with httpx.stream("GET", "https://www.example.com") as r:309... for text in r.iter_text():310... print(text)311```312313Or stream the text, on a line-by-line basis...314315```315```python316>>> with httpx.stream("GET", "https://www.example.com") as r:317... for line in r.iter_lines():318... print(line)319```
1 unmodified line
321HTTPX will use universal line endings, normalising all cases to `\n`.322323In some cases you might want to access the raw bytes on the response without applying any HTTP content decoding. In this case any content encoding that the web server has applied such as `gzip`, `deflate`, or `brotli` will not be automatically decoded.324325```325```python326>>> with httpx.stream("GET", "https://www.example.com") as r:327... for chunk in r.iter_raw():328... print(chunk)329```
124 unmodified lines