# Fetch response returns undefined even though the console shows the source fetched

**URL:** <https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [May 31, 2022, 11:17am UTC](https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879 "2022-05-31T11:17:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dippachernico](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dippachernico/32/27495_2.png) [@dippachernico](https://forum.wixstudio.com/u/dippachernico)\
**Post date:** [May 31, 2022, 11:17am UTC](https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879/1 "2022-05-31T11:17:00Z")

</div>

I’m trying to interface with Wikipedia through the Wix Fetch API. The code is executed in the backend. The response returns undefined, even though the console has all the data ready. Does anyone have an idea why this is?

 ![](https://us1.discourse-cdn.com/wix/original/3X/6/b/6b0d4d6c7055f74d827f44469a0faab203e5d4e7.png)

 ![](https://us1.discourse-cdn.com/wix/original/3X/8/a/8acd180ffa70005c3d7be72e52c329e8af8eb310.png)

---

<div class="post-metadata">

**Author:** ![bwprado](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bwprado/32/7220_2.png) [@bwprado](https://forum.wixstudio.com/u/bwprado)\
**Post date:** [May 31, 2022, 2:08pm UTC](https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879/2 "2022-05-31T14:08:25Z")

</div>

You have to return something from the function. Try adding the return key to the fetch method:

```javascript
...
return fetch(url, { method: "GET" })
...

```

---

<div class="post-metadata">

**Author:** ![dippachernico](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/dippachernico/32/27495_2.png) [@dippachernico](https://forum.wixstudio.com/u/dippachernico)\
**Post date:** [May 31, 2022, 2:39pm UTC](https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879/3 "2022-05-31T14:39:11Z")

</div>

Thank you so much😂 - sometimes it’s the simple things XD

---

<div class="post-metadata">

**Author:** ![bwprado](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/bwprado/32/7220_2.png) [@bwprado](https://forum.wixstudio.com/u/bwprado)\
**Post date:** [May 31, 2022, 4:53pm UTC](https://forum.wixstudio.com/t/fetch-response-returns-undefined-even-though-the-console-shows-the-source-fetched/41879/4 "2022-05-31T16:53:30Z")

</div>

@dippachernico yes, I know. 😂
