How to correctly use Make a web requestion

Hello,

Season's Greetings! I hope you're all doing well. I would greatly appreciate it if someone could please assist me with making a web request using WebCore.

I’m able to successfully run the following command with curl:

C:\Users\dball>curl -X POST https://api.pushbullet.com/v2/pushes -H "Authorization: Bearer <hidden>" -H "Content-Type: application/json" -d "{\"type\":\"note\",\"title\":\"DND Update\",\"body\":\"DayOff=true\"}"

However, when I try to use the "Make a Web Request" action in WebCore, I encounter the following error when running the piston:

12/21/2024, 3:40:48 PM +745ms
+41ms    ║http error Response Status: 400 error Message: Bad Request

Here’s the piston I’ve created:

I suspect this may be a formatting issue, but I thought WebCore would take care of it for me. If anyone has any insights into what might be causing this, I would be incredibly grateful.

Additionally, here is my setup:

FYI I have used "hidden" in place of the Key, so I may display it for review.

Thank you in advance for any help or suggestions!

Not sure about this, but make your DNDData string
\{"type":"note","title":"DND Update","body":"DayOff=true"\}

2 Likes

Thank you for your response! Unfortunately, I’m encountering the same error. Could you confirm if I entered it correctly? I was under the impression there should be a space after the colon (":"). Also, are the backslashes in the correct places?

Update: Just noticed it is now not updating the local varible.

Thank you, @Pantheon! Your formatting was incredibly helpful. Once I entered it this way, it worked perfectly!

1 Like

Glad to help!