> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: Sample Flow ## Article: Sample Flow ## Article Link: https://dev.wix.com/docs/api-reference/assets/http-functions/sdk/sample-flow.md ## Article Content: # http-functions: Sample Usage This article shows a sample flow that calls an HTTP function using the http-functions module. #### Add the following code to your **http-functions.js** file in your site's backend: ```js import { ok, notFound } from "wix-http-functions"; import { members } from "wix-members.v2"; export async function get_member(request) { try { // Get member data. const member = await members.getCurrentMember(); return ok({member}) } catch (error) { // Handle error. return notFound({error}) } }; ``` #### Add the following code in your app to call your HTTP function: ```js import { OAuthStrategy, createClient } from "@wix/sdk"; import { functions } from '@wix/http-functions'; // Create a client. const client = createClient({ auth: OAuthStrategy({ clientId: "{YOUR_HEADLESS_CLIENT_ID}" }), modules: { functions }, }); async function getCurrentMember() { try { // Call your HTTP function. // Use the get() method // because the HTTP function has the 'get' prefix. const response = await client.functions.get('member'); const data = await response.json(); const { member } = data; // Handle member data. } catch (error) { // Handle error. } } getCurrentMember(); ```