The WixHttpFunctionRequest
object breaks the URL of the incoming call to an HTTP
function into different parameters for easy access.
The URL of the incoming call to an HTTP function is broken into:
For premium sites, the URL of the incoming call has the following format:
https://www.domain.com/_functions/myFunction/sub?q=value
https://www.domain.com/_functions
sub
q=value
For free sites, the URL of the incoming call has the following format:
https://user_name.wixsite.com/mysite/_functions/myFunction/sub?q=value
https://user_name.wixsite.com/mysite/_functions
sub
q=value
Returns the base URL of a call to an HTTP function.
Premium sites:
Free sites:
Returns an object representing the body of the incoming call to an HTTP function.
Use the functions of the returned WixHttpFunctionRequestBody
object to get the body in a number of formats.
The request body can be a maximum of 512kb.
Returns the function name of a call to an HTTP function.
Premium sites:
Free sites:
// In http-functions.js
export function use_myFunction(request) {
let functionName = request.functionName; // myFunction
}