Basic HTTP Request from a BlueprintCallable Node
I'm trying to make a basic HTTP Request using a BlueprintCallable node, and I can't make it work. I've read and followed some tutorials and came up with a working "BP Actor" in game doing the HTTP Request, but now i want it to work with a single callable blueprint node like this (without the Target input) :
I've been on this for days now, and I still can't make it work.
Here's what I got now :
The problem is, on the .h file. If I don't put a "static" on my void, the blueprint node ask me for a "Target" in input. I Don't know what "Target" he wants exactly to put here, So I put the void on static. But now, as you can see on the .cpp file, some variables like HTTP or the "this" reference can't be used anymore on this static void.
I'm very bad on CPP, so i'd by glad if someone could help me with this ! Thanks
Normally you call function on a object right? By making function static you make it callable without a objectneeded, but still function be in class namespace.... this effectively also means you can't access "this" because you not calling from object anymore, so there is no "this" naymore. You say yourself, you don't want that "Target" pin, but without it you can't deliver "this" variable to the function.
In other words you can access only static and global functions from static functions, same goes with varables.
So in your case instead of using http variable you need to use FHttpModule::Get() (which is also static function) direclly, all save it up in local variable.
answered May 23 '17 at 09:19 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here