Introduction

HTTP functions allow you to expose the functionality of your site as a service. That means other people can write code to consume the functionality you expose by calling the functions of the API that you define.

Write and export HTTP functions to define custom site APIs. When you and others call the custom site APIs you defined, the corresponding HTTP function runs and the API responds with the HTTP function's return value.

Use the objects and functions in wix-http-functions to:

  • Define the HTTP method used to call the custom site API.
  • Access information passed in the custom site API request.
  • Construct a valid response for the custom site API.
Important:

This API is only intended for use in server-to-server communications. For example, don't use custom site APIs to set a cookie on a site visitor's browser as you may no longer be in compliance with applicable data privacy regulations.

Learn more about custom site APIs and HTTP functions

Did this help?