response( )


Returns a response populated with the information from the options parameter. The response() function creates a custom response built with the information passed to the options parameter in a WixHttpFunctionCustomResponseOptions object.

Use the response() function to create a response to return from an HTTP function.

Method Declaration
Copy
function response(
  options: WixHttpFunctionCustomResponseOptions,
): WixHttpFunctionResponse;
Method Parameters
optionsWixHttpFunctionCustomResponseOptionsRequired

The response options.

Returns
Return Type:WixHttpFunctionResponse
JavaScript
// In http-functions.js import { response } from "wix-http-functions"; export function use_myFunction(request) { return response(); }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?