9from typing
import Mapping, Union, Dict, Any
10from fastapi
import Response
15 A class containing all the known http codes that can be used to reply to websites.
19 * The 3xx: Redirection
20 * The 4xx: Client error
21 * The 5xx: Server error
26 100, 101, 102, 103, 110,
27 200, 201, 202, 203, 204, 205,
29 300, 301, 302, 303, 304, 305,
31 400, 401, 402, 403, 404, 405,
32 406, 407, 408, 409, 410, 411,
33 412, 413, 414, 415, 416, 417,
34 418, 419, 420, 421, 422, 423,
35 424, 425, 426, 428, 429, 430,
37 500, 501, 502, 503, 504, 505,
38 506, 507, 508, 509, 510, 511
41 'json':
'application/json',
44 'xml':
'application/xml',
46 'javascript':
'application/javascript',
47 'js':
'application/javascript',
48 'form':
'application/x-www-form-urlencoded',
49 'form-data':
'multipart/form-data',
57 'pdf':
'application/pdf',
58 'zip':
'application/zip',
59 'gzip':
'application/gzip',
60 'octet-stream':
'application/octet-stream',
62 'plain':
'text/plain',
66 'avi':
'video/x-msvideo',
68 'ogg':
'application/ogg',
69 'jsonld':
'application/ld+json',
70 'markdown':
'text/markdown',
71 'md':
'text/markdown',
72 'rtf':
'application/rtf',
76 'ogg-audio':
'audio/ogg',
81 '3gpp2':
'video/3gpp2',
82 'tar':
'application/x-tar',
83 'ico':
'image/vnd.microsoft.icon',
84 'svg':
'image/svg+xml',
86 'doc':
'application/msword',
87 'docx':
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
88 'xls':
'application/vnd.ms-excel',
89 'xlsx':
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
90 'ppt':
'application/vnd.ms-powerpoint',
91 'pptx':
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
92 'eot':
'application/vnd.ms-fontobject',
103 Function in charge of checking the type provided by the user is one that can be used to send data.
106 data_type (str, optional): _description_. Defaults to None.
109 str: _description_: Returns the correct known version of the sent data.
111 if data_type
is None:
114 data_type = data_type.lower()
121 raise TypeError(f
"Invalid data type: {data_type}")
123 def _check_header(self, header: Union[Mapping[str, str],
None] =
None) -> Any:
125 Function in charge of checking the headers provided by the user.
127 header (Mapping[str, str], optional): _description_. Defaults to None.
129 Any: _description_: Returns the correct known version of the sent headers.
133 elif isinstance(header, Dict):
136 msg =
"Invalid header format, the format you provided is: "
137 msg += f
"{type(header)}"
142 Function in charge of processing the data content to be sent.
145 data (Any): _description_: The data to be sent.
146 data_type (str): _description_: The type of the data to be sent.
149 Any: _description_: The processed data.
153 if data_type == self.
data_types[
'json']
and isinstance(data, Dict):
154 return json.dumps(data)
157 def send_message_on_status(self, status: int = 200, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
159 A generic function in charge of sending a message with a status.
162 status (int, optional): HTTP status code. Defaults to 200.
163 content (Any, optional): The content to send. Defaults to None.
164 content_type (str, optional): The type of the content. Defaults to "JSON".
165 headers (Mapping[str, str], optional): The headers. Defaults to None.
168 Response: FastAPI response object.
174 if isinstance(status, str)
and status.isnumeric():
179 f
"Invalid status code, the code you entered is: {status}"
182 return Response(status_code=status, content=data, media_type=data_type, headers=data_header)
186 def send_continue(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
187 """ send_continue: 100 """
188 return self.
send_message_on_status(status=100, content=content, content_type=content_type, headers=headers)
190 def switching_protocols(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
191 """ switching_protocols: 101 """
192 return self.
send_message_on_status(status=101, content=content, content_type=content_type, headers=headers)
194 def processing(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
195 """ processing: 102 """
196 return self.
send_message_on_status(status=102, content=content, content_type=content_type, headers=headers)
198 def early_hints(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
199 """ early_hints: 103 """
200 return self.
send_message_on_status(status=103, content=content, content_type=content_type, headers=headers)
202 def response_is_stale(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
203 """ response_is_stale: 110 """
204 return self.
send_message_on_status(status=110, content=content, content_type=content_type, headers=headers)
208 def success(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
210 return self.
send_message_on_status(status=200, content=content, content_type=content_type, headers=headers)
212 def created(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
214 return self.
send_message_on_status(status=201, content=content, content_type=content_type, headers=headers)
216 def accepted(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
217 """ accepted: 202 """
218 return self.
send_message_on_status(status=202, content=content, content_type=content_type, headers=headers)
221 """ non_authoritative_information: 203 """
222 return self.
send_message_on_status(status=203, content=content, content_type=content_type, headers=headers)
224 def no_content(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
225 """ no_content: 204 """
226 return self.
send_message_on_status(status=204, content=content, content_type=content_type, headers=headers)
228 def reset_content(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
229 """ reset_content: 205 """
230 return self.
send_message_on_status(status=205, content=content, content_type=content_type, headers=headers)
232 def partial_content(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
233 """ partial_content: 206 """
234 return self.
send_message_on_status(status=206, content=content, content_type=content_type, headers=headers)
236 def multi_status(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
237 """ multi_status: 207 """
238 return self.
send_message_on_status(status=207, content=content, content_type=content_type, headers=headers)
240 def already_reported(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
241 """ already_reported: 208 """
242 return self.
send_message_on_status(status=208, content=content, content_type=content_type, headers=headers)
244 def im_used(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
246 return self.
send_message_on_status(status=226, content=content, content_type=content_type, headers=headers)
248 """ 3xx redirection """
250 def multiple_choices(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
251 """ multiple_choices: 300 """
252 return self.
send_message_on_status(status=300, content=content, content_type=content_type, headers=headers)
254 def moved_permanently(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
255 """ moved_permanently: 301 """
256 return self.
send_message_on_status(status=301, content=content, content_type=content_type, headers=headers)
258 def found(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
260 return self.
send_message_on_status(status=302, content=content, content_type=content_type, headers=headers)
262 def see_other(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
263 """ see_other: 303 """
264 return self.
send_message_on_status(status=303, content=content, content_type=content_type, headers=headers)
266 def not_modified(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
267 """ not_modified: 304 """
268 return self.
send_message_on_status(status=304, content=content, content_type=content_type, headers=headers)
270 def use_proxy(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
271 """ use_proxy: 305 """
272 return self.
send_message_on_status(status=305, content=content, content_type=content_type, headers=headers)
274 def switch_proxy(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
275 """ switch_proxy: 306 """
276 return self.
send_message_on_status(status=306, content=content, content_type=content_type, headers=headers)
278 def temporary_redirect(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
279 """ temporary_redirect: 307 """
280 return self.
send_message_on_status(status=307, content=content, content_type=content_type, headers=headers)
282 def permanent_redirect(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
283 """ permanent_redirect: 308 """
284 return self.
send_message_on_status(status=308, content=content, content_type=content_type, headers=headers)
286 """ 4xx client error """
288 def bad_request(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
289 """ bad_request: 400 """
290 return self.
send_message_on_status(status=400, content=content, content_type=content_type, headers=headers)
292 def unauthorized(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
293 """ unauthorized: 401 """
294 return self.
send_message_on_status(status=401, content=content, content_type=content_type, headers=headers)
296 def payment_required(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
297 """ payment_required: 402 """
298 return self.
send_message_on_status(status=402, content=content, content_type=content_type, headers=headers)
300 def forbidden(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
301 """ forbidden: 403 """
302 return self.
send_message_on_status(status=403, content=content, content_type=content_type, headers=headers)
304 def not_found(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
305 """ not_found: 404 """
306 return self.
send_message_on_status(status=404, content=content, content_type=content_type, headers=headers)
308 def method_not_allowed(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
309 """ method_not_allowed: 405 """
310 return self.
send_message_on_status(status=405, content=content, content_type=content_type, headers=headers)
312 def not_acceptable(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
313 """ not_acceptable: 406 """
314 return self.
send_message_on_status(status=406, content=content, content_type=content_type, headers=headers)
317 """ proxy_authentication_required: 407 """
318 return self.
send_message_on_status(status=407, content=content, content_type=content_type, headers=headers)
320 def request_timeout(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
321 """ request_timeout: 408 """
322 return self.
send_message_on_status(status=408, content=content, content_type=content_type, headers=headers)
324 def conflict(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
325 """ conflict: 409 """
326 return self.
send_message_on_status(status=409, content=content, content_type=content_type, headers=headers)
328 def gone(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
330 return self.
send_message_on_status(status=410, content=content, content_type=content_type, headers=headers)
332 def length_required(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
333 """ length_required: 411 """
334 return self.
send_message_on_status(status=411, content=content, content_type=content_type, headers=headers)
336 def precondition_failed(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
337 """ precondition_failed: 412 """
338 return self.
send_message_on_status(status=412, content=content, content_type=content_type, headers=headers)
340 def payload_too_large(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
341 """ payload_too_large: 413 """
342 return self.
send_message_on_status(status=413, content=content, content_type=content_type, headers=headers)
344 def uri_too_long(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
345 """ uri_too_long: 414 """
346 return self.
send_message_on_status(status=414, content=content, content_type=content_type, headers=headers)
348 def unsupported_media_type(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
349 """ unsupported_media_type: 415 """
350 return self.
send_message_on_status(status=415, content=content, content_type=content_type, headers=headers)
352 def range_not_satisfiable(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
353 """ range_not_satisfiable: 416 """
354 return self.
send_message_on_status(status=416, content=content, content_type=content_type, headers=headers)
356 def expectation_failed(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
357 """ expectation_failed: 417 """
358 return self.
send_message_on_status(status=417, content=content, content_type=content_type, headers=headers)
360 def im_a_teapot(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
361 """ im_a_teapot: 418 """
362 return self.
send_message_on_status(status=418, content=content, content_type=content_type, headers=headers)
364 def page_expired(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
365 """ page_expired: 419 """
366 return self.
send_message_on_status(status=419, content=content, content_type=content_type, headers=headers)
368 def enhance_your_calm(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
369 """ enhance_your_calm: 420 """
370 return self.
send_message_on_status(status=420, content=content, content_type=content_type, headers=headers)
372 def misdirected_request(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
373 """ misdirected_request: 421 """
374 return self.
send_message_on_status(status=421, content=content, content_type=content_type, headers=headers)
376 def unprocessable_entity(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
377 """ unprocessable_entity: 422 """
378 return self.
send_message_on_status(status=422, content=content, content_type=content_type, headers=headers)
380 def locked(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
382 return self.
send_message_on_status(status=423, content=content, content_type=content_type, headers=headers)
384 def failed_dependency(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
385 """ failed_dependency: 424 """
386 return self.
send_message_on_status(status=424, content=content, content_type=content_type, headers=headers)
388 def too_early(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
389 """ too_early: 425 """
390 return self.
send_message_on_status(status=425, content=content, content_type=content_type, headers=headers)
392 def upgrade_required(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
393 """ upgrade_required: 426 """
394 return self.
send_message_on_status(status=426, content=content, content_type=content_type, headers=headers)
396 def precondition_required(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
397 """ precondition_required: 428 """
398 return self.
send_message_on_status(status=428, content=content, content_type=content_type, headers=headers)
400 def too_many_requests(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
401 """ too_many_requests: 429 """
402 return self.
send_message_on_status(status=429, content=content, content_type=content_type, headers=headers)
405 """ request_header_fields_too_large: 431 """
406 return self.
send_message_on_status(status=431, content=content, content_type=content_type, headers=headers)
409 """ unavailable_for_legal_reasons: 451 """
410 return self.
send_message_on_status(status=451, content=content, content_type=content_type, headers=headers)
412 def invalid_token(self, content: Any = {
'msg':
'message'}, content_type: str =
"JSON", headers: Mapping[str, str] =
None) -> Response:
413 """ invalid_token: 498 """
414 return self.
send_message_on_status(status=498, content=content, content_type=content_type, headers=headers)
416 """ 5xx server error"""
418 def internal_server_error(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
419 """ internal_server_error: 500 """
420 return self.send_message_on_status(status=500, content=content, content_type=content_type, headers=headers)
422 def not_implemented(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
423 """ not_implemented: 501 """
424 return self.send_message_on_status(status=501, content=content, content_type=content_type, headers=headers)
426 def bad_gateway(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
427 """ bad_gateway: 502 """
428 return self.send_message_on_status(status=502, content=content, content_type=content_type, headers=headers)
430 def service_unavailable(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
431 """ service_unavailable: 503 """
432 return self.send_message_on_status(status=503, content=content, content_type=content_type, headers=headers)
434 def gateway_timeout(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
435 """ gateway_timeout: 504 """
436 return self.send_message_on_status(status=504, content=content, content_type=content_type, headers=headers)
438 def http_version_not_supported(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
439 """ http_version_not_supported: 505 """
440 return self.send_message_on_status(status=505, content=content, content_type=content_type, headers=headers)
442 def variant_also_negotiates(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
443 """ variant_also_negotiates: 506 """
444 return self.send_message_on_status(status=506, content=content, content_type=content_type, headers=headers)
446 def insufficient_storage(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
447 """ insufficient_storage: 507 """
448 return self.send_message_on_status(status=507, content=content, content_type=content_type, headers=headers)
450 def loop_detected(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
451 """ loop_detected: 508 """
452 return self.send_message_on_status(status=508, content=content, content_type=content_type, headers=headers)
454 def bandwidth_limit_exceeded(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
455 """ bandwidth_limit_exceeded: 509 """
456 return self.send_message_on_status(status=509, content=content, content_type=content_type, headers=headers)
458 def not_extended(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
459 """ not_extended: 510 """
460 return self.send_message_on_status(status=510, content=content, content_type=content_type, headers=headers)
462 def network_authentication_required(self, content: Any = {'msg': 'message'}, content_type: str = "JSON", headers: Mapping[str, str] = None) -> Response:
463 """ network_authentication_required: 511 """
464 return self.send_message_on_status(status=511, content=content, content_type=content_type, headers=headers)
Response request_timeout(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response uri_too_long(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response invalid_token(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response found(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response switching_protocols(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response proxy_authentication_required(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Any _process_data_content(self, Any data, str data_type)
Response switch_proxy(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response conflict(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response send_continue(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response send_message_on_status(self, int status=200, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response payment_required(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response unauthorized(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response multiple_choices(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response precondition_failed(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response reset_content(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response response_is_stale(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response too_many_requests(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response created(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response temporary_redirect(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response gone(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response length_required(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response partial_content(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response enhance_your_calm(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response im_used(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response moved_permanently(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response expectation_failed(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response unsupported_media_type(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response misdirected_request(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response request_header_fields_too_large(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response bad_request(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response forbidden(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response locked(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response not_modified(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response accepted(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response failed_dependency(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response unavailable_for_legal_reasons(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Any _check_header(self, Union[Mapping[str, str], None] header=None)
Response precondition_required(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response too_early(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response page_expired(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response already_reported(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response no_content(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response permanent_redirect(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response multi_status(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response use_proxy(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response early_hints(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response method_not_allowed(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response range_not_satisfiable(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response processing(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response see_other(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response unprocessable_entity(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response not_found(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response non_authoritative_information(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
str _check_data_type(self, Union[str, None] data_type=None)
Response im_a_teapot(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response payload_too_large(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response success(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response upgrade_required(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)
Response not_acceptable(self, Any content={ 'msg':'message'}, str content_type="JSON", Mapping[str, str] headers=None)