HTTP communication using Blueprints

Hi,

This is my very first post since I’ve started using UE4 a couple of days ago and so far everything is just candy and unicorns.
For one of my projects, I have the need to read and store data on a server through a webservice and I wonder if UE4 has those capabilities using Blueprints?

Cheers

Not out of the box. There are a few possibilities like the WebUI plugin but this is quite project specific. I would say that something like a json library would be quite awesome but BP doesn’t really have dictionaries in the common sense. You’d be left with potentially multidimensional structs which is not quite what I’d call user friendly… Especially since you’d have to dynamically create them. Come to think of it I wouldn’t know a proper way to port a json object (or any way developed to get a lot of data from server to client) directly to BP even if you’d try. You’ll probably have to write a wrapper for your specific values and get them with a simple getter for it from a call in BP… unless you plan on adding dictionaries and multidimensional arrays to the engine.

You can fairly easily get some data with this webUI widget as well as storing it (if you setup a URL based API) with the javascript interface it offers. But otherwise you will have to do it via C++ (which is a lot more comfortable anyway since there are a few good libraries for http communication and all different kinds of protocols you might receive)

That was not the answer i was hoping for :slight_smile:

I am somewhat skilled in C++ but my intention with UE4 was to keep away from bytewrangling and due to this i haven’t even bothered to look at UE4-CPP.
Is it possible to begin with a C++ project, implement new features exposed to Blueprint and keep developing the game in the editor?

Cheers

You should be able to simply create one or two nodes inside of your original blueprint project.

Under “File” you should be able to select “Add code to project” and then create a custom node.

take a look at VaRest :wink:

2 Likes