luna_lambda_tools.public.standalone.standalone_request.StandaloneLambdaRequest
- final class luna_lambda_tools.public.standalone.standalone_request.StandaloneLambdaRequest(*args, **kwargs)[source]
Standalone lambda request
Methods
__init__(*args, **kwargs)generate_id(*_)getBody()Get body 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
requestIddataForMonitoringstartRequestTimeCheckPointstartRequestTimeerrorstreamResponseacceptThe
Acceptheader parsed :rtype: AcceptContainerappappCtxGet app context
argsGet query arguments.
beautyRouteGet request beauty route :returns: beauty uri template
bodycharsetThe value of charset part for Content-Type HTTP header.
clientsconfigGet application config.
conn_infocontent_typeThe value of content part for Content-Type HTTP header.
cookiesIncoming cookies on the request :rtype: Dict[str, str]
credentialsAttempt to return the auth header value.
ctxendpointAlias of
sanic.request.Request.name:rtype: Optional[str]filesThe request body parsed as uploaded files
formThe request body parsed as form data
forwardedActive proxy information obtained from request headers, as specified in Sanic configuration.
headheadershostport).
idA request ID passed from the client, or generated from the backend.
ippeer ip of the socket :rtype: str
is_cacheableWhether the HTTP method is cacheable.
is_idempotentWhether the HTTP method is iempotent.
is_safeWhether the HTTP method is safe.
jsonGet json from request
loggermatch_infomatched info after resolving route
methodnameThe route name
network_pathsAccess the network paths if available
parsed_acceptparsed_argsparsed_credentialsparsed_filesparsed_formparsed_forwardedparsed_jsonparsed_not_grouped_argsparsed_tokenpathpath of the local HTTP request :rtype: str
portpeer port of the socket :rtype: int
protocolThe HTTP protocol instance
query_argsMethod to parse query_string using urllib.parse.parse_qsl.
query_stringrepresentation of the requested query :rtype: str
raw_headersThe unparsed HTTP headers :rtype: bytes
raw_urlremote_addrClient IP address, if available.
request_lineThe first line of a HTTP request :rtype: bytes
request_middleware_startedrespondedrouteschemeDetermine request scheme.
scopeThe ASGI scope of the request.
server_namehostname the client connected to, by
request.host:rtype: strserver_pathfull path of current URL; uses proxied or local path :rtype: str
server_portThe port the client connected to, by forwarded
portorrequest.host.socketInformation about the connected socket if available
streamstream_idAccess the HTTP/3 stream ID.
tokenAttempt to return the auth header token.
transporturi_templateThe defined URI template :rtype: Optional[str]
urlthe URL :rtype: str
versionaccountId