# Http-functions.js

**URL:** <https://forum.wixstudio.com/t/http-functions-js/74629>\
**Category:** Ask the community\
**Tags:** wix-http-functions, wix-data, wix, code\
**Created:** [October 29, 2025, 8:49pm UTC](https://forum.wixstudio.com/t/http-functions-js/74629 "2025-10-29T20:49:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user6442](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@user6442](https://forum.wixstudio.com/u/user6442)\
**Post date:** [October 29, 2025, 8:49pm UTC](https://forum.wixstudio.com/t/http-functions-js/74629/1 "2025-10-29T20:49:08Z")

</div>

\*\*Hi everybody

I’m having trouble with http-functions\*\*  
**Working in** Wix Editor, Dev Mode

I’ve created in my backend a http-function.js file which includes the following :

// backend/http-functions.js

**import** wixData **from** ‘wix-data’;

**import** { ok, forbidden, serverError } **from** ‘wix-http-functions’;

**export**  **function** get\_getImages(request) {

console.log(“getImages called”);

**return** ok({

items: [

{

schema: “example.png”,

nom: “Exemple”,

}

]

});

}

When i test it with hoppscotch, i get an empty response in json  
URL tested looks like the following :

[https://username.wixsite.com/site-name/\_functions/getImages](https://username.wixsite.com/site-name/_functions/getImages)

Any clue, why this doesn’t work ?

Thanks a lot for your support

---

<div class="post-metadata">

**Author:** ![DeanAyalon](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/deanayalon/32/94633_2.png) [@DeanAyalon](https://forum.wixstudio.com/u/DeanAyalon)\
**Post date:** [October 30, 2025, 9:41pm UTC](https://forum.wixstudio.com/t/http-functions-js/74629/2 "2025-10-30T21:41:06Z")

</div>

According to [documentation](https://dev.wix.com/docs/velo/velo-only-apis/wix-http-functions/ok)

The object you pass as argument to `ok()` should be of the following type:  
`{ body: any, headers: Headers }`

Try this:

```js
return ok({
  body: {
    items: [{ 
      schedule: 'example.png',
      nom: 'example'
    }]
  }
})

```

---

<div class="post-metadata">

**Author:** ![user6442](https://avatars.discourse-cdn.com/v4/letter/u/e480ec/32.png) [@user6442](https://forum.wixstudio.com/u/user6442)\
**Post date:** [November 2, 2025, 8:50am UTC](https://forum.wixstudio.com/t/http-functions-js/74629/3 "2025-11-02T08:50:57Z")

</div>

Thank you very much Dean

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/system/32/86885_2.png) [@system](https://forum.wixstudio.com/u/system)\
**Post date:** [December 2, 2025, 8:51am UTC](https://forum.wixstudio.com/t/http-functions-js/74629/4 "2025-12-02T08:51:08Z")

</div>

Closed on December 2, 2025, 8:51am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
