Notehub Proxy for Notecard Web Requests Issue

Using Notecard Web Requests, i want to send post api for my server.

I checked all the items to send the post method for my server, But it still dosen’t work.

Here’s my Routes for ‘Proxy for Notecard Web Requests and Notehub Logs.

  • Notecard Web Requests
    • Http Headers: { ‘Access-Control-Allow-origin’: ‘*’, ‘Contetnt-Type’: ‘application/json’ }
    • JSONata Transform, Outbound Request Transform
      • {

        “req”: {

        “web.post”: {

        “url”: “myURL”,

        “body”: {

        “fileBase64”: body.fileBase64 ~> $default(“”),

        “name”: body.name,

        “deviceName”: body.deviceName ~> $default(“noName”)

          },
        

        “header”: {

        “Access-Control-Allow-Origin”: “*”,

        “Content-Type”: “application/json”

          }
        
        }
        

        }

        }

  • Notehub Logs
    • {“Allow”:[“GET, HEAD”],“Cache-Control”:[“no-cache, no-store, max-age=0, must-revalidate”],“Content-Type”:[“application/json;charset=UTF-8”],“Date”:[“Fri, 05 Sep 2025 08:34:48 GMT”],“Expires”:[“0”],“Pragma”:[“no-cache”],“Server”:[“Apache/2.4.58 (Ubuntu)”],“X-Content-Type-Options”:[“nosniff”],“X-Frame-Options”:[“DENY”],“X-Xss-Protection”:[“1; mode=block”]}
    • JSON Log
      • {
        “event”: “e8e85d11-e74f-401a-a590-26f69288610a”,
        “when”: 1757061285,
        “file”: “_web.qo”,
        “body”: {
        “method”: “POST”,
        “name”: “/test.log”,
        “route”: “log-test-server”
        },
        “session”: “0e935d29-e32d-4646-848a-6ba16212d243”,
        “best_id”: “dev:861059067897441”,
        “device”: “dev:861059067897441”,
        “product”: “myproduct”,
        “app”: “app:478f9790-6636-44c6-84c8-7931915afe00”,
        “received”: 1757061288.056351,
        “req”: “web.post”,
        “status”: “success”,
        }

Hey @sglee99,

And welcome to the Blues community!

The issue here is the web.post request does not take a url argument. Instead, to do web transactions with Notecard you must first set up a proxy route in Notehub that includes the URL you’d like to use.

I’d recommend reading through our guide to web transactions, as it has a walkthrough on how to send a request to your server.

TJ

1 Like