HTTPClient (not working?)

2017-07-24
2017-08-02
  • nothinrandom - 2017-07-24

    Hey All,

    So I have device that does a simple echo to a webpage. For example, the device echos the value of 3000 (attached snippet). There's no header or body or any HTML tag...just a plain value of 3000. With this in mind, can the HTTPClient library get the info? I tried using it, but no success. I get HTTP response of 200, which is OK. Maybe I'm doing something wrong?

    Thanks.

    IMG: Capture.JPG

     
  • nothinrandom - 2017-07-24

    I'm getting this for header, which looks correct due to content length:

    "Date: Sun, 23 Jul 2017 20:09:02 GMT$NExpires: Sun, 23 Jul 2017 20:09:02 GMT$NContent-type: text/html;charset=iso-8859-1$R$NContent-length: 4"

    Edit: I guess the closest thing to what I'm trying to read would be this page:
    view-source:http://httpbin.org/deny

    How can I modify the HTTPClient to read this page?

    Thanks

     
  • robert - 2017-07-27

    Use $R$N instead of $N in the http header.

     
  • nothinrandom - 2017-08-02

    r.lang hat geschrieben:
    Use $R$N instead of $N in the http header.

    Hi r.lang,

    Thanks for your response. Not sure if I follow you. Where could you modify this in the header though?

    Thanks,

     

Log in to post a comment.