({{, (RefLink[HTTPRequestData, paclet:ref/HTTPRequestData])["prop"] 
gives the value of the specified property of the current HTTP request.}, {, (RefLink[HTTPRequestData, paclet:ref/HTTPRequestData])[]
gives an association with values of properties of the current HTTP request.}})

OpenersNotesSection(Spacer1)Details

The properties available through (RefLink[HTTPRequestData, paclet:ref/HTTPRequestData]) depend on the evaluation environment being used, as determined by (RefLink[$EvaluationEnvironment, paclet:ref/$EvaluationEnvironment]).

(RefLink[HTTPRequestData, paclet:ref/HTTPRequestData])["Properties"] gives a list of properties available in any particular case.

In web-based environments, the following are typically available:

OpenersPrimaryExamplesSection(Spacer1)Examples  (5)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Deploy a delayed expression that will give the request data:

obj = CloudDeploy[Delayed[HTTPRequestData[], "WL"]]

Request the delayed expression to show the request data:

URLExecute[obj]

OpenersExampleSection1(Spacer1)Scope  (4)

Deploy a delayed expression that gives the query parameters as a list of rules:

obj = CloudDeploy[Delayed[HTTPRequestData["Query"], "WL"]]

Request the delayed expression and pass query parameters:

URLRead[
URLBuild[obj, <|"name"->"Socrates", "country"->"Greece"|>], 
"Body"
]

Deploy a delayed expression that gives multiple request data properties:

obj = CloudDeploy[Delayed[HTTPRequestData[{"Method","Query","FormRules"}], "WL"]]

Request the delayed expression using the POST method:

URLRead[
HTTPRequest[obj, <|"Body" -> <|"name"->"Socrates", "country"->"Greece"|>|>], 
"Body"
]

Deploy a delayed expression that manually checks that query parameters are all numbers:

obj = CloudDeploy[Delayed[Interpreter["Number"][HTTPRequestData["Query"][[All, 2]]], "WL"]]

URLExecute[obj, <|"x" -> "2", "s" -> "a"|>]

Implement your own version of (RefLink[APIFunction, paclet:ref/APIFunction]):

apifunction[form_, func_] := Delayed[With[{values = Setting[form[HTTPRequestData["Query"]]]}, If[FreeQ[values, Failure], func[values], $Failed]], "WL"];

api = CloudDeploy[apifunction[FormObject["x" -> "Integer"], #x!&]]

URLExecute[api, <|"x" -> "24"|>]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[$UserAgentString, paclet:ref/$UserAgentString])  ▪  (RefLink[$RequesterAddress, paclet:ref/$RequesterAddress])  ▪  (RefLink[$GeoLocation, paclet:ref/$GeoLocation])  ▪  (RefLink[URLParse, paclet:ref/URLParse])  ▪  (RefLink[URLRead, paclet:ref/URLRead])  ▪  (RefLink[URLExecute, paclet:ref/URLExecute])  ▪  (RefLink[CloudLoggingData, paclet:ref/CloudLoggingData])  ▪  (RefLink[URLDispatcher, paclet:ref/URLDispatcher])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Cloud Execution Metadata, paclet:guide/CloudExecutionMetadata])}, {▪(RefLinkPlain[Cookie Management, paclet:guide/CookieManagement])}, {▪(RefLinkPlain[HTTP Requests & Responses, paclet:guide/HTTPRequestsAndResponses])}, {▪(RefLinkPlain[Cloud Functions & Deployment, paclet:guide/CloudFunctionsAndDeployment])}, {▪(RefLinkPlain[Creating Form Interfaces & Apps, paclet:guide/CreatingFormsAndApps])}, {▪(RefLinkPlain[Creating Instant APIs, paclet:guide/CreatingAnInstantAPI])}})}})