# Make local HTTP-Request

**URL:** <https://community.particle.io/t/make-local-http-request/30865>\
**Category:** General\
**Created:** [March 23, 2017, 8:05am UTC](https://community.particle.io/t/make-local-http-request/30865 "2017-03-23T08:05:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![HansWurst90](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hanswurst90/32/13713_2.png) [@HansWurst90](https://community.particle.io/u/HansWurst90)\
**Post date:** [March 23, 2017, 8:05am UTC](https://community.particle.io/t/make-local-http-request/30865/1 "2017-03-23T08:05:05Z")

</div>

Hi,  
I want to use my photon + InternetButton to trigger lights in my HomeAutomation.  
Therefore I need do a HTTP-Request to my local server.  
Via terminal the request looks like this:  
`curl -X PUT http://127.0.0.1:51826/characteristics --header "Content-Type:Application/json" --header "authorization: 031-45-154" --data "{ \"characteristics\": [{ \"aid\": 2, \"iid\": 9, \"value\": 0}] }"`  
Is it possible to make a request like this (local, PUT, headers and data) with a photon?  
Thank’s in Advance,

Jan

---

<div class="post-metadata">

**Author:** ![MORA](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/mora/32/8575_2.png) [@MORA](https://community.particle.io/u/MORA)\
**Post date:** [March 23, 2017, 9:55am UTC](https://community.particle.io/t/make-local-http-request/30865/2 "2017-03-23T09:55:21Z")

</div>

Should be possible - [https://github.com/nmattisson/httpclient](https://github.com/nmattisson/httpclient) (HTTPclient in build lib search)

Local, headers and PUT support.

---

<div class="post-metadata">

**Author:** ![HansWurst90](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hanswurst90/32/13713_2.png) [@HansWurst90](https://community.particle.io/u/HansWurst90)\
**Post date:** [March 23, 2017, 10:17am UTC](https://community.particle.io/t/make-local-http-request/30865/3 "2017-03-23T10:17:15Z")

</div>

Thank you.  
That looks really promising. I have to admit after searching for “HTTPclient” I found better result than for “Particle Http reuqest local” 😃  
I just couldn’t think of what this kind of lib would be called.  
I’ll give it a try tonight.

---

<div class="post-metadata">

**Author:** ![HansWurst90](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hanswurst90/32/13713_2.png) [@HansWurst90](https://community.particle.io/u/HansWurst90)\
**Post date:** [March 28, 2017, 7:23am UTC](https://community.particle.io/t/make-local-http-request/30865/4 "2017-03-28T07:23:04Z")

</div>

It works.  
Thank you a lot!
