massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / coc-python-data / languageServer.0.5.59 / Typeshed / stdlib / 2 / httplib.pyi
1 # Stubs for httplib (Python 2)\r
2 #\r
3 # Generated by stubgen and manually massaged a bit.\r
4 # Needs lots more work!\r
5 \r
6 from typing import Any, Dict\r
7 import mimetools\r
8 \r
9 class HTTPMessage(mimetools.Message):\r
10     def addheader(self, key: str, value: str) -> None: ...\r
11     def addcontinue(self, key: str, more: str) -> None: ...\r
12     dict = ...  # type: Dict[str, str]\r
13     unixfrom = ...  # type: str\r
14     headers = ...  # type: Any\r
15     status = ...  # type: str\r
16     seekable = ...  # type: bool\r
17     def readheaders(self) -> None: ...\r
18 \r
19 class HTTPResponse:\r
20     fp = ...  # type: Any\r
21     debuglevel = ...  # type: Any\r
22     strict = ...  # type: Any\r
23     msg = ...  # type: Any\r
24     version = ...  # type: Any\r
25     status = ...  # type: Any\r
26     reason = ...  # type: Any\r
27     chunked = ...  # type: Any\r
28     chunk_left = ...  # type: Any\r
29     length = ...  # type: Any\r
30     will_close = ...  # type: Any\r
31     def __init__(self, sock, debuglevel=0, strict=0, method=None, buffering: bool=...) -> None: ...\r
32     def begin(self): ...\r
33     def close(self): ...\r
34     def isclosed(self): ...\r
35     def read(self, amt=None): ...\r
36     def fileno(self): ...\r
37     def getheader(self, name, default=None): ...\r
38     def getheaders(self): ...\r
39 \r
40 class HTTPConnection:\r
41     response_class = ...  # type: Any\r
42     default_port = ...  # type: Any\r
43     auto_open = ...  # type: Any\r
44     debuglevel = ...  # type: Any\r
45     strict = ...  # type: Any\r
46     timeout = ...  # type: Any\r
47     source_address = ...  # type: Any\r
48     sock = ...  # type: Any\r
49     def __init__(self, host, port=None, strict=None, timeout=..., source_address=None) -> None: ...\r
50     def set_tunnel(self, host, port=None, headers=None): ...\r
51     def set_debuglevel(self, level): ...\r
52     def connect(self): ...\r
53     def close(self): ...\r
54     def send(self, data): ...\r
55     def putrequest(self, method, url, skip_host=0, skip_accept_encoding=0): ...\r
56     def putheader(self, header, *values): ...\r
57     def endheaders(self, message_body=None): ...\r
58     def request(self, method, url, body=None, headers=...): ...\r
59     def getresponse(self, buffering: bool=...): ...\r
60 \r
61 class HTTP:\r
62     debuglevel = ...  # type: Any\r
63     def __init__(self, host: str=..., port=None, strict=None) -> None: ...\r
64     def connect(self, host=None, port=None): ...\r
65     def getfile(self): ...\r
66     file = ...  # type: Any\r
67     headers = ...  # type: Any\r
68     def getreply(self, buffering: bool=...): ...\r
69     def close(self): ...\r
70 \r
71 class HTTPSConnection(HTTPConnection):\r
72     default_port = ...  # type: Any\r
73     key_file = ...  # type: Any\r
74     cert_file = ...  # type: Any\r
75     def __init__(self, host, port=None, key_file=None, cert_file=None, strict=None, timeout=..., source_address=None, context=None) -> None: ...\r
76     sock = ...  # type: Any\r
77     def connect(self): ...\r
78 \r
79 class HTTPS(HTTP):\r
80     key_file = ...  # type: Any\r
81     cert_file = ...  # type: Any\r
82     def __init__(self, host: str=..., port=None, key_file=None, cert_file=None, strict=None, context=None) -> None: ...\r
83 \r
84 class HTTPException(Exception): ...\r
85 class NotConnected(HTTPException): ...\r
86 class InvalidURL(HTTPException): ...\r
87 \r
88 class UnknownProtocol(HTTPException):\r
89     args = ...  # type: Any\r
90     version = ...  # type: Any\r
91     def __init__(self, version) -> None: ...\r
92 \r
93 class UnknownTransferEncoding(HTTPException): ...\r
94 class UnimplementedFileMode(HTTPException): ...\r
95 \r
96 class IncompleteRead(HTTPException):\r
97     args = ...  # type: Any\r
98     partial = ...  # type: Any\r
99     expected = ...  # type: Any\r
100     def __init__(self, partial, expected=None) -> None: ...\r
101 \r
102 class ImproperConnectionState(HTTPException): ...\r
103 class CannotSendRequest(ImproperConnectionState): ...\r
104 class CannotSendHeader(ImproperConnectionState): ...\r
105 class ResponseNotReady(ImproperConnectionState): ...\r
106 \r
107 class BadStatusLine(HTTPException):\r
108     args = ...  # type: Any\r
109     line = ...  # type: Any\r
110     def __init__(self, line) -> None: ...\r
111 \r
112 class LineTooLong(HTTPException):\r
113     def __init__(self, line_type) -> None: ...\r
114 \r
115 error = ...  # type: Any\r
116 \r
117 class LineAndFileWrapper:\r
118     def __init__(self, line, file) -> None: ...\r
119     def __getattr__(self, attr): ...\r
120     def read(self, amt=None): ...\r
121     def readline(self): ...\r
122     def readlines(self, size=None): ...\r
123 \r
124 # Constants\r
125 \r
126 responses = ...  # type: Dict[int, str]\r
127 \r
128 HTTP_PORT = ...  # type: int\r
129 HTTPS_PORT = ...  # type: int\r
130 \r
131 # status codes\r
132 # informational\r
133 CONTINUE = ...  # type: int\r
134 SWITCHING_PROTOCOLS = ...  # type: int\r
135 PROCESSING = ...  # type: int\r
136 \r
137 # successful\r
138 OK = ...  # type: int\r
139 CREATED = ...  # type: int\r
140 ACCEPTED = ...  # type: int\r
141 NON_AUTHORITATIVE_INFORMATION = ...  # type: int\r
142 NO_CONTENT = ...  # type: int\r
143 RESET_CONTENT = ...  # type: int\r
144 PARTIAL_CONTENT = ...  # type: int\r
145 MULTI_STATUS = ...  # type: int\r
146 IM_USED = ...  # type: int\r
147 \r
148 # redirection\r
149 MULTIPLE_CHOICES = ...  # type: int\r
150 MOVED_PERMANENTLY = ...  # type: int\r
151 FOUND = ...  # type: int\r
152 SEE_OTHER = ...  # type: int\r
153 NOT_MODIFIED = ...  # type: int\r
154 USE_PROXY = ...  # type: int\r
155 TEMPORARY_REDIRECT = ...  # type: int\r
156 \r
157 # client error\r
158 BAD_REQUEST = ...  # type: int\r
159 UNAUTHORIZED = ...  # type: int\r
160 PAYMENT_REQUIRED = ...  # type: int\r
161 FORBIDDEN = ...  # type: int\r
162 NOT_FOUND = ...  # type: int\r
163 METHOD_NOT_ALLOWED = ...  # type: int\r
164 NOT_ACCEPTABLE = ...  # type: int\r
165 PROXY_AUTHENTICATION_REQUIRED = ...  # type: int\r
166 REQUEST_TIMEOUT = ...  # type: int\r
167 CONFLICT = ...  # type: int\r
168 GONE = ...  # type: int\r
169 LENGTH_REQUIRED = ...  # type: int\r
170 PRECONDITION_FAILED = ...  # type: int\r
171 REQUEST_ENTITY_TOO_LARGE = ...  # type: int\r
172 REQUEST_URI_TOO_LONG = ...  # type: int\r
173 UNSUPPORTED_MEDIA_TYPE = ...  # type: int\r
174 REQUESTED_RANGE_NOT_SATISFIABLE = ...  # type: int\r
175 EXPECTATION_FAILED = ...  # type: int\r
176 UNPROCESSABLE_ENTITY = ...  # type: int\r
177 LOCKED = ...  # type: int\r
178 FAILED_DEPENDENCY = ...  # type: int\r
179 UPGRADE_REQUIRED = ...  # type: int\r
180 \r
181 # server error\r
182 INTERNAL_SERVER_ERROR = ...  # type: int\r
183 NOT_IMPLEMENTED = ...  # type: int\r
184 BAD_GATEWAY = ...  # type: int\r
185 SERVICE_UNAVAILABLE = ...  # type: int\r
186 GATEWAY_TIMEOUT = ...  # type: int\r
187 HTTP_VERSION_NOT_SUPPORTED = ...  # type: int\r
188 INSUFFICIENT_STORAGE = ...  # type: int\r
189 NOT_EXTENDED = ...  # type: int\r