Varest Json Request

Im trying to send a json request with a header and parameters but cant see to do so. I can either send the header without parameters or, parameters without the header. But i need to be able to send both in the same request.

This first image successfully send the header and the second image successfully sends the parameters

292985-2.png

1 Like

Please always use ApplyUrl or ProcessURL instead. CallURL is broken and will be removed very soon (replaced with new one function).

I’ll check params sending in urlencoded form next week.

1 Like

I am still getting message body missing when using process URL, If you look at the top image i think ive done everything correct yet still getting error from API.

I’ve just checked it with https://httpbin.org/get and all works as it should:

LogBlueprintUserMessages: [NewBlueprint_2] {"args":{"oneMoreThing":"567","testParam":"value1"},"headers":{"Accept":"*/*","Accept-Encoding":"deflate, gzip","Content-Type":"application/x-www-form-urlencoded","Customhone":"Test1","Customhtwo":"123","Host":"httpbin.org","User-Agent":"VaRestDemo/++UE4+Release-4.23-CL-9631420 Windows/10.0.18362.1.256.64bit"},"orig
in":"185.6.245.138, 185.6.245.138","url":"https://httpbin.org/get?testParam=value1&oneMoreThing=567"}
2 Likes

I just tried it still not working :confused: Not sure if it makes a difference but i am posting not getting.

did you solve your problem?

For the authorization header, put Bearer in front of the {token code}, it will work!
image_2022-12-18_002327868

2 Likes

theoden horse master
on the ‘construct json request’ node you must set content type to ‘json’ for the body to work, worked for me

Hi @ufna is there an example with a bearer token to access and list a Cloudflare stream? Cloudflare API Documentation