Etsy counter

Posted on
  • Hello,
    I'm trying to create a counter for Etsy platform which has its own API. I have already tried it via console ( with XMLHttpRequest()) and everything works fine. And have started working with ESP8266.
    Wifi connected, the request is sent, but I receive not the same answer as for example when putting the same URL in the browser.

    My function:

    function getPage() {
      require("http").get("https://openapi.ets­", function(res) {
       console.log("Response: ",res);
         res.on('data', function(data) { contents += data; });
         res.on('close', function(contents) { console.log(contents); });

    in console I see:

    Response:  httpCRs {
      "headers": {
        "Location": "",
        "Server": "BigIP",
        "Content-Length": "0",
        "Accept-Ranges": "bytes",
        "Date": "Thu, 20 Jul 2017 03:06:32 GMT",
        "Via": "1.1 varnish",
        "Age": "0",
        "Connection": "close",
        "X-Served-By": "cache-yyz8330-YYZ",
        "X-Cache": "MISS",
        "X-Cache-Hits": "0",
        "X-Timer": "S1500519992.012622,VS0,VE37"
      "httpVersion": "1.1",
      "statusCode": "302",
      "statusMessage": "Found"

    But if I put the same request in browser "" I at least see "API request missing api_key or valid OAuth parameters" (just don't want to show my ApiKey).

    As for other links "" or "­.5/weather?q=London,uk&appid=b1b15e88fa7­97225412429c1c50c122a1" everything is ok.

    So in result I'm see 'the wall' before next steps.

    Could anyone help to solve it?


  • Looks like you got this sorted?­307898

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Etsy counter

Posted by Avatar for Hansi @Hansi