Why can't FHttpRequestPtr

Hi all…

I’m trying to talk to an HTTP server. There is an endpoint that I need to call and its HTTP type is GET and requires a JSON payload to be sent.

However, it seems as though FHttpRequestPtr does not allow you to add a payload to a GET. When I try to send, I get the following error/warning

Warning: An HTTP get request cannot contain a payload.

Can we really not send JSON to a GET? If so, does anyone know how you’re supposed to properly setup the http request object??? I have other endpoints that I can call without issue, but they are POST…

Thanks for any help!

GET requests are not supposed to have a body.

Looks like you are in a case where the client is not compatible, due to the server going against the SPEC.

This error seems specific to the UE wrapper of CURL (FCurlHttpRequest), so maybe you can try switching to FWinHttpRequest. It’ll probably not be portable though (I’m assuming it’s windows-only). From the looks of it, you’d have to use a source engine to rebuild it with WITH_CURL=0.