Particle Making Get Request to Local IP


I have particle photon dev board.
I want it to connect my wifi and make get request to local website for example:

i cant make it with webhook. Im trying to use HttpClient library but i cant make it work.

How can i make simple get request to html file hosted in local intranet.

Thanks for your advises.

What have you tried so far?

in header part of code im sending:

http_header_t headers[] = {
 { "Content-Type", "text/html" },
 { "Accept" , "*/*"},
 { NULL, NULL }  

and host configuration:

request.hostname = "";
request.port = 80;
request.path = "/";

requested adress is returning html.

When i look result from serial monitor it is:

Response status: -1

Try dropping the protocol prefix “http://” as this is not part of the host name.
If this doesn’t help, try setting the IP address as IPAddress is this is also not a host name.

request.ip = IPAddress(192,168,1,106);

Hello ScruffR,

Thanks for your reply. You saved my time. I tried as you said and its worked.