Using the WixHttpFunctionResponse object, you define an appropriate response after the handling of an incoming request. There are a number of functions you can use to create the WixHttpFunctionResponse, such as:

To define the response, set the body, headers, and status properties.


  • This API is only intended for use in server-to-server communications. If you use this API to set a cookie on a site visitor's browser you may no longer be in compliance with applicable data privacy regulations.

  • All of the above functions except response() always create a response object with a pre-set HTTP status code (e.g. for ok() this is always 200), which cannot be overridden.

Was this helpful?