HTTP functions allow you to expose the functionality of a Wix site as a service in the form of APIs. If you’ve added functionality to a site with code and want to use it in an app, you can expose HTTP functions and call the APIs in your code.
Use the http-functions
module to to call your site’s HTTP functions with authentication context. Authentication context is information about who is calling an API. This means you can use functions that return different responses based on the user who calls them, such as getCurrentMember()
, in your HTTP functions.
Your site's HTTP function's prefix defines which SDK method to use to call it. For example, call the HTTP function get_myFunction()
using get()
.