# Javascript Fetch API

**URL:** <https://community.particle.io/t/javascript-fetch-api/22705>\
**Category:** Troubleshooting\
**Created:** [May 6, 2016, 2:45am UTC](https://community.particle.io/t/javascript-fetch-api/22705 "2016-05-06T02:45:36Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Moors7](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/moors7/32/588_2.png) [@Moors7](https://community.particle.io/u/Moors7)\
**Post date:** [May 6, 2016, 7:55pm UTC](https://community.particle.io/t/javascript-fetch-api/22705/4 "2016-05-06T19:55:54Z")

</div>

That URL is structured as a GET request, which should actually be a POST request. They need to be treated differently. This guide has been very helpful for this:

> [@Tutorial: Spark Variable and Function on One Web Page](https://community.particle.io/t/tutorial-spark-variable-and-function-on-one-web-page/4181):
>
> Let’s say you have a Spark core with both a Spark variable and a Spark function. In my case, I have the world’s simplest servo control sketch, using the nice miniature servo in the Spark Maker Kit. Using these parts, we will build a servo that you can control from a web page anywhere and monitor the position of the servo too! Here’s a preview of the finished tutorial: [image] There is a coarse adjust slider, two fine adjust buttons, and the current position of the servo is displayed. That…

---

_[View the full topic](https://community.particle.io/t/javascript-fetch-api/22705)._
