Files
pyGoEdge-UserPanel/.venv/Lib/site-packages/urllib3/util/__pycache__/request.cpython-312.pyc

107 lines
8.1 KiB
Plaintext
Raw Normal View History

2025-11-18 03:36:49 +08:00
<EFBFBD>
f<> i<> <00><01>&<00>UddlmZddlZddlZddlmZddlmZddlm Z ddl
m Z ejrdd lm Z d
Zegd <0B><01>Zd Z ddlZed z Z ddlmZedz ZGd<10>de<07>Zej6Zded<ej<eefZ hd<14>Z! d dd<15>Z" dd<16>Z#dd<17>Z$Gd<18>dejJ<00>Z& dd<1A>Z'y#e$rddlZY<00><>wxYw#e$rY<00><>wxYw#e$r ddlZedz Zn #e$rYnwxYwY<00><>wxYw) <20>)<01> annotationsN)<01> b64encode)<01>Enum<75>)<01>UnrewindableBodyError<6F>)<01>to_bytes)<01>Finalz@@@SKIP_HEADER@@@)<03>accept-encoding<6E>host<73>
user-agentz gzip,deflatez,br)<01>zstdz,zstdc<01><00>eZdZdZy)<03>_TYPE_FAILEDTELLrN)<04>__name__<5F>
__module__<EFBFBD> __qualname__<5F>token<65><00><00>CE:\Project\pygoedge\.venv\Lib\site-packages\urllib3/util/request.pyrr/s<00><00> <0A>ErrzFinal[_TYPE_FAILEDTELL]<5D> _FAILEDTELL><00>GET<45>HEAD<41>TRACE<43>DELETE<54>CONNECT<43>OPTIONSc<01>t<00>i}|r>t|t<00>rn(t|t<00>rdj|<01>}nt}||d<|r||d<|rd|d<|r.dt |j d<07><00>j<00><00><00>|d<|r.dt |j d<07><00>j<00><00><00>|d <|rd
|d <|S) ad
Shortcuts for generating request headers.
:param keep_alive:
If ``True``, adds 'connection: keep-alive' header.
:param accept_encoding:
Can be a boolean, list, or string.
``True`` translates to 'gzip,deflate'. If the dependencies for
Brotli (either the ``brotli`` or ``brotlicffi`` package) and/or Zstandard
(the ``zstandard`` package) algorithms are installed, then their encodings are
included in the string ('br' and 'zstd', respectively).
List will get joined by comma.
String will be used as provided.
:param user_agent:
String representing the user-agent you want, such as
"python-urllib3/0.6"
:param basic_auth:
Colon-separated username:password string for 'authorization: basic ...'
auth header.
:param proxy_basic_auth:
Colon-separated username:password string for 'proxy-authorization: basic ...'
auth header.
:param disable_cache:
If ``True``, adds 'cache-control: no-cache' header.
Example:
.. code-block:: python
import urllib3
print(urllib3.util.make_headers(keep_alive=True, user_agent="Batman/1.0"))
# {'connection': 'keep-alive', 'user-agent': 'Batman/1.0'}
print(urllib3.util.make_headers(accept_encoding=True))
# {'accept-encoding': 'gzip,deflate'}
<20>,r r z
keep-alive<76>
connectionzBasic zlatin-1<> authorizationzproxy-authorizationzno-cachez cache-control)<08>
isinstance<EFBFBD>str<74>list<73>join<69>ACCEPT_ENCODINGr<00>encode<64>decode)<07>
keep_alive<EFBFBD>accept_encoding<6E>
user_agent<EFBFBD>
basic_auth<EFBFBD>proxy_basic_auth<74> disable_cache<68>headerss r<00> make_headersr1?s<><00><00>b!<21>G<EFBFBD><16> <15>o<EFBFBD>s<EFBFBD> +<2B> <10> <17><0F><14> .<2E>!<21>h<EFBFBD>h<EFBFBD><EFBFBD>7<>O<EFBFBD>-<2D>O<EFBFBD>%4<><07>!<21>"<22><11> *<2A><07> <0C><1D><11> ,<2C><07> <0C><1D><11><14>Y<EFBFBD>z<EFBFBD>0<>0<><19>;<3B><<3C>C<>C<>E<>F<> G<> <10><0F> <20><18><14>Y<EFBFBD>/<2F>6<>6<>y<EFBFBD>A<>B<>I<>I<>K<>L<> M<> <10>%<25>&<26><15>#-<2D><07><0F> <20> <12>Nrc<01><><00>|<01>t||<01>|St|dd<01><00> |j<00>}|S|S#t$r
t}Y|SwxYw)z
If a position is provided, move file to that point.
Otherwise, we'll attempt to record a position for future use.
N<>tell)<05> rewind_body<64>getattrr3<00>OSErrorr)<02>body<64>poss r<00>set_file_positionr9<00>sc<00><00> <0B><EFBFBD><13>D<EFBFBD>#<23><1E> <0F>J<EFBFBD>
<11><14>v<EFBFBD>t<EFBFBD> $<24> 0<> <1E><16>)<29>)<29>+<2B>C<EFBFBD> <0F>J<EFBFBD>3<EFBFBD>J<EFBFBD><4A> <17> <1E><1E>C<EFBFBD> <0E>J<EFBFBD>  <1E>s<00>3<00>A<03>Ac<01><><00>t|dd<02>}|<02>t|t<00>r
||<01>y|t
ur t d<04><00>t dt|<01><00>d<06><03><00>#t$r}t d<03>|<03>d}~wwxYw)z<>
Attempt to rewind body to a certain position.
Primarily used for request redirects and retries.
:param body:
File-like object that supports seek.
:param int pos:
Position to seek to in file.
<20>seekNzAAn error occurred when rewinding request body for redirect/retry.zRUnable to record file position for rewinding request body during a redirect/retry.z1body_pos must be of type integer, instead it was <20>.)r5r#<00>intr6rr<00>
ValueError<EFBFBD>type)r7<00>body_pos<6F> body_seek<65>es rr4r4<00>s<><00><00><18><04>f<EFBFBD>d<EFBFBD>+<2B>I<EFBFBD><10><1C><1A>H<EFBFBD>c<EFBFBD>!:<3A> <15> <15>h<EFBFBD> <1F>
<12>[<5B> <20>#<23> 4<>
<EFBFBD>
<EFBFBD>
<19>?<3F><04>X<EFBFBD><0E>?O<>q<EFBFBD> Q<>
<EFBFBD>
<EFBFBD><EFBFBD><17> <15>'<27>S<><0E><14> <15><> <15>s<00>A<00> A/<03> A*<03>*A/c<01>"<00>eZdZUded<ded<y)<06>ChunksAndContentLengthztyping.Iterable[bytes] | None<6E>chunksz
int | None<6E>content_lengthN)rrr<00>__annotations__rrrrDrD<00>s<00><00> )<29>)<29><1E>rrDc<01><><00><00><02><00><00>d}|j<00>tvrd}nld}nit<00>ttf<02>rt <00><00>f}t |d<00>}n8t<00>d<03>rd<07><02>fd<04> }|<05>}d}n t<00><00>}<06>f}|j}t||<04><06>S#t$r. t<00><00>}d}n#t$rtd<05><00><02><02>d<01>wxYwY<00>CwxYw)aRTakes the HTTP request method, body, and blocksize and
transforms them into an iterable of chunks to pass to
socket.sendall() and an optional 'Content-Length' header.
A 'Content-Length' of 'None' indicates the length of the body
can't be determined so should use 'Transfer-Encoding: chunked'
for framing instead.
Nr<00>readc3<01><><00>K<00>t<00>tj<00>} <00>j<00><02>}|sy|r|j d<01>}|<01><01><00>,<2C>w)Nzutf-8)r#<00>io<69>
TextIOBaserIr()r(<00> datablock<63> blocksizer7s <20><>r<00>chunk_readablez&body_to_chunks.<locals>.chunk_readable<6C>sK<00><><00><><00><1F><04>b<EFBFBD>m<EFBFBD>m<EFBFBD>4<>F<EFBFBD><16> <20>I<EFBFBD>I<EFBFBD>i<EFBFBD>0<> <09> <20><19><19> )<29> 0<> 0<><17> 9<>I<EFBFBD><1F><0F> <17>s<00>AA zO'body' must be a bytes-like object, file-like object, or iterable. Instead was )rErF)<02>returnztyping.Iterable[bytes]) <0A>upper<65>_METHODS_NOT_EXPECTING_BODYr#r$<00>bytesr <00>len<65>hasattr<74>
memoryview<EFBFBD>nbytes<65> TypeError<6F>iterrD)r7<00>methodrNrErFrO<00>mvs` ` r<00>body_to_chunksr\<00>s<><00><><00>$ <0C>|<7C><15><06> <11><<3C><<3C>><3E>!<<3C> <<3C><1E>N<EFBFBD>!<21>N<EFBFBD>
<14>D<EFBFBD>3<EFBFBD><05>,<2C> '<27><1A>4<EFBFBD>.<2E>"<22><06><1C>V<EFBFBD>A<EFBFBD>Y<EFBFBD><1E><0E>
<11><14>v<EFBFBD> <1E> <20> <20>!<21><06><1D><0E> '<27><1B>D<EFBFBD>!<21>B<EFBFBD><1B>W<EFBFBD>F<EFBFBD><1F>Y<EFBFBD>Y<EFBFBD>N<EFBFBD> !<21><16><0E> O<>O<><4F><19> <1C> <1C><1D>d<EFBFBD><1A><06>!%<25><0E><><1C> <1C><1F>8<>8<<3C>x<EFBFBD>A<01><12><1C><1C> <1C><><1F> <1C>s*<00>2 B<00> C<03># B1<02>0C<03>1C
<05>
C<03>C)NNNNNN)r*<00> bool | Noner+zbool | list[str] | str | Noner,<00>
str | Noner-r^r.r^r/r]rPzdict[str, str])r7z
typing.Anyr8<00>_TYPE_BODY_POSITION | NonerPr_)r7ztyping.IO[typing.AnyStr]r@<00>_TYPE_BODY_POSITIONrP<00>None)r7ztyping.Any | NonerZr$rNr=rPrD)(<28>
__future__rrK<00>typing<6E>base64r<00>enumr<00>
exceptionsr<00>utilr <00> TYPE_CHECKINGr
<00> SKIP_HEADER<45> frozenset<65>SKIPPABLE_HEADERSr'<00>
brotlicffi<EFBFBD>_unused_module_brotli<6C> ImportError<6F>brotli<6C> compressionr<00>_unused_module_zstd<74> zstandardrrrrG<00>Unionr=r`rRr1r9r4<00>
NamedTuplerDr\rrr<00><module>rus<><00><01>"<22> <09> <0A><1C><15>.<2E><1A> <09><17><17><1C> "<22> <0B><1D>G<>H<><11> <20><0F><1D>/<2F>2<> <14>u<EFBFBD><1C>O<EFBFBD>  <0A><06><14>w<EFBFBD><1E>O<EFBFBD><0E>t<EFBFBD><0E>(8<>'=<3D>'=<3D> <0B> $<24>=<3D><1C>l<EFBFBD>l<EFBFBD>3<EFBFBD>(8<>#8<>9<><13>W<01><1B>#<23>59<35>!<21>!<21>#'<27>!%<25> N<13><1B>N<13>2<>N<13><1B>N<13><1B> N<13>
!<21> N<13> <1F> N<13><14>N<13>b<0F>
<14><0F>5<><0F><1F><0F>(
<EFBFBD><<1F>V<EFBFBD>.<2E>.<2E><1F>
CP<01>
<1B>CP<01>%(<28>CP<01>58<35>CP<01><1B>CP<01><>] <17>/<2F>.<2E>/<2F><><12> <09><08> <09><><13> <0A> <0A>/<2F><17>7<EFBFBD>"<22><0F><> <16> <0A> <0C> <0A><>  <0A>s`<00>
C<00> C2<00> C$<03>!C'<00>#C$<03>$C'<00>'C/<03>.C/<03>2D<03>8 D<02>D<03>D
<05>D<03> D
<05>
D<03>D