hyb
2026-01-30 44480e71b27aa9d4cb8441f50c873f1b110e9691
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
Ë
ê^iË&ãó—ddlmZddlZddlZddlmZddlmZddl    m
Z
ddl m Z m Z ddlmZd    gZej"ej$eeej"eeffej,eej"eefffZGd
„d    «Zy) é)Ú annotationsN)Ú    urlencodeé)Ú
_TYPE_BODY)ÚHTTPHeaderDict)Ú _TYPE_FIELDSÚencode_multipart_formdata)ÚBaseHTTPResponseÚRequestMethodscó֗eZdZdZhd£Zd    d
d„Z                d                                                             d d„Z                d                                                             dd„Z        d                                            dd„Z                d                                                             dd„Z    y)r a·
    Convenience mixin for classes who implement a :meth:`urlopen` method, such
    as :class:`urllib3.HTTPConnectionPool` and
    :class:`urllib3.PoolManager`.
 
    Provides behavior for making common types of HTTP request methods and
    decides which type of request field encoding to use.
 
    Specifically,
 
    :meth:`.request_encode_url` is for sending requests whose fields are
    encoded in the URL (such as GET, HEAD, DELETE).
 
    :meth:`.request_encode_body` is for sending requests whose fields are
    encoded in the *body* of the request using multipart or www-form-urlencoded
    (such as for POST, PUT, PATCH).
 
    :meth:`.request` is for making any kind of request, it will look up the
    appropriate encoding format and use one of the above two methods to make
    the request.
 
    Initializer parameters:
 
    :param headers:
        Headers to include with all requests, unless other headers are given
        explicitly.
    >ÚGETÚHEADÚDELETEÚOPTIONSNcó—|xsi|_y©N)Úheaders)Úselfrs  õkH:\项目\archive\测试组\脚本\Change_password\venv_build\Lib\site-packages\urllib3/_request_methods.pyÚ__init__zRequestMethods.__init__3s €Ø’} "ˆ óc ó—td«‚)NzMClasses extending RequestMethods must implement their own ``urlopen`` method.)ÚNotImplementedError)rÚmethodÚurlÚbodyrÚencode_multipartÚmultipart_boundaryÚkws        rÚurlopenzRequestMethods.urlopen6s€ô"ð ,ó
ð    
rc ó¨—|j«}| | td«‚|o|€ |j}dttj
|j ««vrt|«}d|d<tj|dd¬«jd«}|||d    <||jvr|j||f||d
œ|¤ŽS|j||f||d
œ|¤ŽS) ay
        Make a request using :meth:`urlopen` with the appropriate encoding of
        ``fields`` based on the ``method`` used.
 
        This is a convenience method that requires the least amount of manual
        effort. It can be used in most situations, while still having the
        option to drop down to more specific methods when necessary, such as
        :meth:`request_encode_url`, :meth:`request_encode_body`,
        or even the lowest level :meth:`urlopen`.
 
        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)
 
        :param url:
            The URL to perform the request on.
 
        :param body:
            Data to send in the request body, either :class:`str`, :class:`bytes`,
            an iterable of :class:`str`/:class:`bytes`, or a file-like object.
 
        :param fields:
            Data to encode and send in the URL or request body, depending on ``method``.
 
        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.
 
        :param json:
            Data to encode and send as JSON with UTF-encoded in the request body.
            The ``"Content-Type"`` header will be set to ``"application/json"``
            unless specified otherwise.
        zUrequest got values for both 'body' and 'json' parameters which are mutually exclusivez content-typezapplication/jsonú Content-Type)ú,ú:F)Ú
separatorsÚ ensure_asciizutf-8r)Úfieldsr)ÚupperÚ    TypeErrorrÚmapÚstrÚlowerÚkeysrÚ_jsonÚdumpsÚencodeÚ_encode_url_methodsÚrequest_encode_urlÚrequest_encode_body)rrrrr'rÚjsonÚ
urlopen_kws        rÚrequestzRequestMethods.requestEs€ðV—‘“ˆà Ð  Р0ÜØgóð ð Р؈؟,™,à"¤c¬#¯)©)°W·\±\³^Ó&DÑDÜ(¨Ó1Ø*<˜Ñ'ä—;‘;˜t°
ÈÔO×VÑVØóˆDð Ð Ø!%ˆJvÑ à T×-Ñ-Ñ -Ø*4×*Ñ*ØØððØñ    ð
ñ ð ð,4×+Ñ+ؘðØ$*°GñØ?Iñð rc ó–—|€ |j}d|i}|j|«|r|dt|«zz }|j||fi|¤ŽS)a}
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the url. This is useful for request methods like GET, HEAD, DELETE, etc.
 
        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)
 
        :param url:
            The URL to perform the request on.
 
        :param fields:
            Data to encode and send in the URL.
 
        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.
        rú?)rÚupdaterr )rrrr'rr5Úextra_kws       rr2z!RequestMethods.request_encode_url“sW€ð4 ˆ?Ø—l‘lˆGà+4°gÐ*>ˆØ‰˜
Ô#á Ø 3œ 6Ó*Ñ*Ñ *ˆCàˆt|‰|˜F CÑ4¨8Ñ4Ð4rc ó—|€ |j}dt|«i}|rId|vr td«‚|rt||¬«\}    }
n t    |«d}
}    |    |d<|dj d|
«|j |«|j||fi|¤ŽS)aÇ    
        Make a request using :meth:`urlopen` with the ``fields`` encoded in
        the body. This is useful for request methods like POST, PUT, PATCH, etc.
 
        When ``encode_multipart=True`` (default), then
        :func:`urllib3.encode_multipart_formdata` is used to encode
        the payload with the appropriate content type. Otherwise
        :func:`urllib.parse.urlencode` is used with the
        'application/x-www-form-urlencoded' content type.
 
        Multipart encoding must be used when posting files, and it's reasonably
        safe to use it in other times too. However, it may break request
        signing, such as with OAuth.
 
        Supports an optional ``fields`` parameter of key/value strings AND
        key/filetuple. A filetuple is a (filename, data, MIME type) tuple where
        the MIME type is optional. For example::
 
            fields = {
                'foo': 'bar',
                'fakefile': ('foofile.txt', 'contents of foofile'),
                'realfile': ('barfile.txt', open('realfile').read()),
                'typedfile': ('bazfile.bin', open('bazfile').read(),
                              'image/jpeg'),
                'nonamefile': 'contents of nonamefile field',
            }
 
        When uploading a file, providing a filename (the first parameter of the
        tuple) is optional but recommended to best mimic behavior of browsers.
 
        Note that if ``headers`` are supplied, the 'Content-Type' header will
        be overwritten because it depends on the dynamic random boundary string
        which is used to compose the body of the request. The random boundary
        string can be explicitly set with the ``multipart_boundary`` parameter.
 
        :param method:
            HTTP request method (such as GET, POST, PUT, etc.)
 
        :param url:
            The URL to perform the request on.
 
        :param fields:
            Data to encode and send in the request body.
 
        :param headers:
            Dictionary of custom headers to send, such as User-Agent,
            If-None-Match, etc. If None, pool headers are used. If provided,
            these headers completely replace any pool-specific headers.
 
        :param encode_multipart:
            If True, encode the ``fields`` using the multipart/form-data MIME
            format.
 
        :param multipart_boundary:
            If not specified, then a random boundary will be generated using
            :func:`urllib3.filepost.choose_boundary`.
        rrzFrequest got values for both 'fields' and 'body', can only specify one.)Úboundaryz!application/x-www-form-urlencodedr")rrr)r    rÚ
setdefaultr9r ) rrrr'rrrr5r:rÚ content_types            rr3z"RequestMethods.request_encode_body¸s²€ðF ˆ?Ø—l‘lˆGà+4´nÀWÓ6MÐ*Nˆñ ؘÑ#ÜØ\óðñ Ü%>ØÐ%7ô&Ñ"‘lô
˜fÓ%Ø7ð#ð
 $ˆHVÑ Ø YÑ × *Ñ *¨>¸<Ô Hà‰˜
Ô#àˆt|‰|˜F CÑ4¨8Ñ4Ð4rr)rútyping.Mapping[str, str] | NoneÚreturnÚNone)NNTN)rr+rr+rú_TYPE_BODY | Nonerr?rÚboolrú
str | Nonerú
typing.Anyr@r
)NNNN)rr+rr+rrBr'ú_TYPE_FIELDS | Nonerr?r4ztyping.Any | Noner5rEr@r
)NN) rr+rr+r'z_TYPE_ENCODE_URL_FIELDS | Nonerr?r5r+r@r
)rr+rr+r'rFrr?rrCrrDr5r+r@r
)
Ú__name__Ú
__module__Ú __qualname__Ú__doc__r1rr r6r2r3©rrr r s’„ñò8?Ðô%ð#'Ø37Ø!%Ø)-ð 
àð 
ðð 
ð ð     
ð
1ð 
ð ð 
ð'ð 
ðð 
ð
ó 
ð&#'Ø&*Ø37Ø"&ðLàðLððLð ð    Lð
$ð Lð 1ð Lð ðLð!ðLð
óLðd26Ø37ð #5àð#5ðð#5ð/ð    #5ð
1ð #5ð ð #5ð
ó#5ðR'+Ø37Ø!%Ø)-ð^5àð^5ðð^5ð$ð    ^5ð
1ð ^5ð ð ^5ð'ð^5ðð^5ð
ô^5r)Ú
__future__rr4r.ÚtypingÚ urllib.parserÚ_base_connectionrÚ _collectionsrÚfilepostrr    Úresponser
Ú__all__ÚUnionÚSequenceÚtupler+ÚbytesÚMappingÚ_TYPE_ENCODE_URL_FIELDSr rKrrú<module>rZs†ðÝ"ãÛ Ý"å(Ý(ß=Ý&à Ð
€à Ÿ,™,Ø
‡OOE˜#˜vŸ|™|¨C°¨JÑ7Ð7Ñ8Ñ9Ø
‡NN3˜Ÿ ™  S¨% ZÑ0Ð0Ñ1ð3ñÐ÷ B5òB5r