logo elektroda
logo elektroda
X
logo elektroda

ESP8266 - How to send a request to the server and receive HTML code?

BARVX 1212 7
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16821254
    BARVX
    Level 6  
    Posts: 22
    Rate: 2
    Has anyone managed using the esp8266 so that they send a request to the server and get the HTML code of the page in response.
  • ADVERTISEMENT
  • #2 16821573
    donlucka2
    Level 12  
    Posts: 47
    Help: 2
    Rate: 3
    Can you describe more clearly?
    I do not really understand.
  • ADVERTISEMENT
  • #3 16823392
    BARVX
    Level 6  
    Posts: 22
    Rate: 2
    What I mean is: how do I send a request so that I can see the html code of the page on the terminal (uart communication).
  • #4 16823964
    Anonymous
    Anonymous  
  • #5 16825803
    BARVX
    Level 6  
    Posts: 22
    Rate: 2
    +IPD,0,427:GET / HTTP/1.1
    Host: 192.168.0.15
    Connection: keep-alive
    Cache-Control: max-age=0
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
    Upgrade-Insecure-Requests: 1
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
    Accept-Encoding: gzip, deflate
    Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7

    I got something like this, but I don't know how to make a query out of it.
  • ADVERTISEMENT
  • #6 16825951
    Anonymous
    Anonymous  
  • ADVERTISEMENT
  • #7 16826027
    BARVX
    Level 6  
    Posts: 22
    Rate: 2
    Well, yes, but you still have to indicate the ip number of the site, because how should it see which server to send the request to.
  • #8 16826042
    Anonymous
    Anonymous  

Topic summary

LABEL_AI_GENERATED
The discussion focuses on how to use the ESP8266 module to send HTTP requests to a server and receive the HTML code of a webpage via UART communication. The user seeks guidance on forming the request to view the HTML response on a terminal. Responses suggest analyzing HTTP traffic with tools like WireShark and recommend configuring the ESP8266 as a server to capture HTTP GET requests from a browser for reference. It is emphasized that the ESP8266 must specify the target server's IP address when opening a connection to send the request properly. An example of a captured HTTP GET request header is provided, illustrating the structure of the request that the ESP8266 should generate to retrieve the HTML content.
AI summary based on the discussion. May contain errors.
ADVERTISEMENT