# Basic Fetch Error

**URL:** <https://discourse.nodered.org/t/basic-fetch-error/22416>\
**Category:** General\
**Created:** [29 February 2020 17:17 UTC](https://discourse.nodered.org/t/basic-fetch-error/22416 "2020-02-29T17:17:17Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [1 March 2020 16:29 UTC](https://discourse.nodered.org/t/basic-fetch-error/22416/6 "2020-03-01T16:29:39Z")

</div>

@Waynedejager looking at the URL you've provided, I can see its using chunked transfer-encoding and I _think_ its slightly malformed in its response.

When I get it with `curl -vvv` I see the error:

> - Leftovers after chunking: 5 bytes

This tells us the response has 5 bytes more in it than expected (I think). It would appear that curl and browsers know how to handle this sort of error by assuming those extra bytes are meant to be there. It appears the node.js HTTP library is less forgiving.

I just tried this code in a node.js shell using the core HTTP library:

```auto
  var http = require("http");
  var req = http.get({
     hostname: "41.192.149.206",
     port: 8080,
     path: '/query?select=%5Btime.iso,ch1.d2,ch1.amps.d2,ch1.va.d2,ch1.pf.d2%5D&begin=h-30m&end=h&group=30m&format=json&header=yes'
  },(res) => { }).on('error', (e) => {
  console.error(e);
})

```

So I don't think you'd have much luck with other http modules that use this library under the covers.

Is there any scope to modify the server implementation?

---

_[View the full topic](https://discourse.nodered.org/t/basic-fetch-error/22416)._
