# Hub request error: response from web service does not appear to be JSON {not-json}

**URL:** <https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939>\
**Category:** Notehub.io\
**Created:** [March 22, 2025, 1:14am UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939 "2025-03-22T01:14:31Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vickylry](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@vickylry](https://discuss.blues.com/u/vickylry)\
**Post date:** [March 22, 2025, 1:14am UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/1 "2025-03-22T01:14:31Z")

</div>

Hi, I’m using Notecarrier Pi with Notecard Cellular. I’m trying to send a web get request to a custom AWS public http endpoint. I’m able to get expected json response using manual curl as well as copying this link into web browser. However, when I set up the route in Notehub and get it this way, I always receive {‘result’: 503, ‘body’: {‘err’: ‘hub request error: response from web service does not appear to be JSON {not-json}’}}. AWS also doesn’t observe any get requests. I also tried setting up another public api route, which I was able to web get with Notehub and receive results as expected. Any ideas why the custom endpoint is not working? Is there a way for us to monitor the raw http request sent by Notehub?

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [March 24, 2025, 9:48pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/2 "2025-03-24T21:48:20Z")

</div>

Hi @vickylry and welcome to the Blues community!

Would it be possible to share the endpoint you are using here (or DM me if you can’t or don’t want to make it public)? Either that or share a screenshot of your route in Notehub (with any private info redacted?

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![vickylry](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@vickylry](https://discuss.blues.com/u/vickylry)\
**Post date:** [March 26, 2025, 2:37pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/3 "2025-03-26T14:37:58Z")

</div>

Hi @RobLauer, thank you for your response! I can’t figure out how to DM you, so I attached our route in Notehub. We are able to talk to the server and receive expected response in binary format then decode to json if we set content to “plain/text”. However, if we set the content to “application/json”, the server doesn’t see any requests.

 ![Screenshot 2025-03-26 at 10.32.01 AM](https://us1.discourse-cdn.com/flex020/uploads/blues/original/2X/a/ab025ced5e838f1b59ff305b20bf4c55f78941ac.png)

```auto
req = {"req": "web.get"}
req["route"] = "GetDetection"
req["name"] = "/ACCCCC"
req["content"] = "plain/text"
rsp = card.Transaction(req)

# rsp["payload"] contains the base64-encoded plain text
encoded_payload = rsp["payload"]
# Decode the base64 string
decoded_payload = base64.b64decode(encoded_payload).decode('utf-8')
# Parse the decoded string as JSON
json_data = json.loads(decoded_payload)
# Now json_data is a Python dictionary containing the JSON data.
print(json.dumps(json_data, indent=2))

```

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [March 26, 2025, 3:52pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/4 "2025-03-26T15:52:49Z")

</div>

Hi @vickylry,

Can you try copying/pasting the returned JSON (from a curl request or browser) into a JSON verifier to triple check that it’s properly formatted: [https://jsonformatter.curiousconcept.com/](https://jsonformatter.curiousconcept.com/)

I’m wondering if there is some minor issue with the JSON formatting that you are missing but Notehub is picking up on.

Thanks,  
Rob

---

<div class="post-metadata">

**Author:** ![vickylry](https://avatars.discourse-cdn.com/v4/letter/v/b782af/32.png) [@vickylry](https://discuss.blues.com/u/vickylry)\
**Post date:** [March 26, 2025, 5:39pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/5 "2025-03-26T17:39:43Z")

</div>

Hi @RobLauer, I tried copying the returned JSON from browser to this website, and it shows that it is valid. Here is a sample response:

```auto
{"match":false}

```

If I first accept the response content as plain/text, store the server response in cache, then web.get it from cache with response content set as application/json, it works.

---

<div class="post-metadata">

**Author:** ![Pius4109](https://avatars.discourse-cdn.com/v4/letter/p/e0b2c6/32.png) [@Pius4109](https://discuss.blues.com/u/Pius4109)\
**Post date:** [July 27, 2025, 4:56pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/6 "2025-07-27T16:56:09Z")

</div>

Pls, I am currently having the same problem. How was this solved?

When using the Proxy for Notecard Web Requests route to make a GET request, I keep getting this error.

```auto
{
 "result": 503,
 "body": {
  "err": "hub request error: response from web service does not appear to be JSON {not-json}"
 }
}

```

However, when I perform the same GET request outside Notehub, it works without any issue.  
Here is the curl request:

```auto
curl -L \
  --url 'https://studio.edgeimpulse.com/v1/api/{projectId}/deployment/targets' \
  --header 'x-api-key: YOUR_API_KEY' \
  --header 'Accept: */*'

```

Here is my route setup:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/blues/original/2X/0/031c29e4515d7ed40e5d53655016d34d58957a7b.png)

---

<div class="post-metadata">

**Author:** ![RobLauer](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/roblauer/32/1567_2.png) [@RobLauer](https://discuss.blues.com/u/RobLauer)\
**Post date:** [July 28, 2025, 2:21pm UTC](https://discuss.blues.com/t/hub-request-error-response-from-web-service-does-not-appear-to-be-json-not-json/2939/7 "2025-07-28T14:21:10Z")

</div>

Hi @Pius4109,

Sorry, we never followed up with an actual solution on this thread! Try adding another HTTP header with `host` as the name and (in your case) `studio.edgeimpulse.com` as the value. For some reason, the host is omitted in certain scenarios and this will guarantee it is replaced.

Rob
