luna_lambda_tools.public.handlers.handlers_request.HandlersLambdaRequest
- final class luna_lambda_tools.public.handlers.handlers_request.HandlersLambdaRequest(*args, **kwargs)[source]
- Handlers lambda request - Methods - __init__(*args, **kwargs)- generate_id(*_)- getBody()- Get body from request - getRequestData(pydanticModel)- Get data from request - get_args([keep_blank_values, ...])- Get query arguments. Overload default keep_blank_values :type keep_blank_values: - bool:param keep_blank_values: flag indicating whether blank values in percent-encoded queries should be treated as blank strings :type strict_parsing:- bool:param strict_parsing: flag indicating what to do with parsing errors :type encoding:- str:param encoding: specify how to decode percent-encoded sequences :type errors:- str:param errors: specify how to decode percent-encoded sequences.- get_current()- Retrieve the current request object - get_form([keep_blank_values])- Method to extract and parse the form data from a request. - get_query_args([keep_blank_values, ...])- Method to parse query_string using urllib.parse.parse_qsl. - load_json([loads])- receive_body()- Receive request.body, if not already received. - reset_response()- respond([response, status, headers, ...])- Respond to the request without returning. - sendToMonitoring(points)- Send point to monitoring - url_for(view_name, **kwargs)- Same as - sanic.Sanic.url_for(), but automatically determine scheme and netloc base on the request.- Attributes - requestId- dataForMonitoring- startRequestTimeCheckPoint- startRequestTime- error- streamResponse- accept- The - Acceptheader parsed :rtype: AcceptContainer- app- appCtx- Get app context - args- Get query arguments. - beautyRoute- Get request beauty route :rtype: - str:returns: beauty uri template- body- charset- The value of charset part for Content-Type HTTP header. - config- Get application config. - conn_info- content_type- The value of content part for Content-Type HTTP header. - cookies- Incoming cookies on the request :rtype: Dict[str, str] - credentials- Attempt to return the auth header value. - ctx- data- Get events sources from request - endpoint- Alias of - sanic.request.Request.name:rtype: Optional[str]- files- The request body parsed as uploaded files - form- The request body parsed as form data - forwarded- Active proxy information obtained from request headers, as specified in Sanic configuration. - head- headers- host- port). - id- A request ID passed from the client, or generated from the backend. - ip- peer ip of the socket :rtype: str - is_cacheable- Whether the HTTP method is cacheable. - is_idempotent- Whether the HTTP method is iempotent. - is_safe- Whether the HTTP method is safe. - json- Get json from request - logger- match_info- matched info after resolving route - method- name- The route name - network_paths- Access the network paths if available - parsed_accept- parsed_args- parsed_credentials- parsed_files- parsed_form- parsed_forwarded- parsed_json- parsed_not_grouped_args- parsed_token- path- path of the local HTTP request :rtype: str - port- peer port of the socket :rtype: int - protocol- The HTTP protocol instance - query_args- Method to parse query_string using urllib.parse.parse_qsl. - query_string- representation of the requested query :rtype: str - raw_headers- The unparsed HTTP headers :rtype: bytes - raw_url- remote_addr- Client IP address, if available. - request_line- The first line of a HTTP request :rtype: bytes - request_middleware_started- responded- route- scheme- Determine request scheme. - scope- The ASGI scope of the request. - server_name- hostname the client connected to, by - request.host:rtype: str- server_path- full path of current URL; uses proxied or local path :rtype: str - server_port- The port the client connected to, by forwarded - portor- request.host.- socket- Information about the connected socket if available - stream- stream_id- Access the HTTP/3 stream ID. - token- Attempt to return the auth header token. - transport- uri_template- The defined URI template :rtype: Optional[str] - url- the URL :rtype: str - version- accountId