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.
function response(
options: WixHttpFunctionCustomResponseOptions,
): WixHttpFunctionResponse;
The response options.
// In http-functions.js
import { response } from "wix-http-functions";
export function use_myFunction(request) {
return response();
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.