Fetching data from Node.Js Server


i want fetch json data(time , date) node.js server esp8266-01 using http method. 

i have used software serial definition as
#include<softwareserial.h>
softwareserial ser(a8,a9);                    // connect tx , rx of esp8266 (a8     for tx a9 rx) of atmega2560.

in code have written

ser.print(string("get ") + "/details http/1.1/\r\n" +
               "192.168.1.11"+ "\r\n" +
               "connection: close\r\n\r\n");

  // read lines of reply server , print them serial
  serial.println("respond:");
  while(ser.available()){
    string line = ser.readstringuntil('\r');
    serial.print(line);
  }

  serial.println();
  serial.println("closing connection");


where ser defined function esp8266-01
192.168.1.11 local server ip address have fetch json data(data , time in case).

but not able fetch date , time data.


thank you.

what rest service url defined in node js?

post whole code, if code contains other logics create new code show issue.


Arduino Forum > Using Arduino > Project Guidance > Fetching data from Node.Js Server


arduino

Comments

Popular posts from this blog

Error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode - Raspberry Pi Forums

class MPU6050 has no member named begin

missing filename after '-o'