[Plugin] Http/s REST, blueprintable JSON query and Parse API manager [VaRest]

Events not firing

I’m having some trouble with the response events, in my game instance class everything works as expected. However in my player state the complete / fail events don’t fire.


fire.PNG

VaRest Log’s requests on my Dedicated Server…

LogVaRest: Request(json): POST 127.0.0.1:27017/Auth
JSON({
“Email”: “Email”,
“Password”: “Password”
})

The problem is this is sensitive data. And if other players host a dedicated server then the hosts will see the passwords of other players. Is there anyway I can silent the log for requests or specific requests?

Hey :slight_smile:
I try something really simple…
I send a request to a server and want just to return the content of this webpage, but i cant get it working.

-Khayalan

How would you take the “response content” of a POST request and attach it to a global variable?

Like for example, your POST to my login on my server with a valid username/password, it comes back with a response that looks like:

I want to somehow take that “token” value and attach it/set it to a global variable called “Token” to be pulled in later GET requests via Set Header as it used for the JWT auth system I have on the server and it would need it for subsequent requests to the server to authenticate valid GET requests in the header.

This is a screenshot of my current blueprint for the POST request, I am not sure what I could do as far as taking the response content and formatting it out to just pull in the token value?

I have 3 returned results coming from an SQL query - they are stored in the JSON object as follows - i can echo them all via php and show them on a web page - but i cant seem to access them in UE4 from the response object - how can i get the response object as an array and iterate it?

//DB ACTION
$result = mysql_query("SELECT * FROM characters a, accounts b WHERE a.accountid_fk = b.id AND b.username = '$username'") or die("Failed to get characters database ".mysql_error());

if (mysql_num_rows($result) > 0){
    while($row = mysql_fetch_assoc($result)) {
        $Name = $row'name'];
        
        $array] = array(
        'Status' => "1",
        'CharNames' => "$Name"
        );
    }
}

$json = json_encode($array);

echo utf8_encode($json);

in IE:

http://puu.sh/v4fPB/e261312166.png

SOLVED

Properly returning & using json object with arrays inside of it:

Hello guys,
I want to know is it possible to use OAuth 1.0 with this plugin ? and set Consumer Key & Consumer Secret

I can not find construct parse request.

Does this plugin give access to cookies as well ?

Hello, Is it possible to live stream game via this plugin?

I am missing access to response bytes or atleast FHttpResponsePtr. It is stored only in local variable (VaRestRequestJSON.cpp@457). I am not sure if there is some other way to access response bytes as some of my calls are returning byte stream and I need to parse it.

Hello, I use VarRest for my project (Blueprint) but I can’t export to HTML5 or even launch to this platform… Can you help me ? Please I really need this amayzing work…

I cannot get the 4.19 source from github to compile (I only need windows x32&x64 not all the linux/iOS/android bs)

Edit: I fixed it.

Hmm… okay, so I hit an issue, not sure why it is an issue BUT:
I am trying to get a bunch of stars from a mysql databas, via PHP in JSON format to UE4.
The webpart works, UE4 gets the data so everything works.

Up until I try to loop through the data UE4 received.
SO the data is sent in the following format:
{
“stars”:
{
“n”:“starname”,
“t”:5000.0,
“x”:1,
“y”:1,
“z”:1,
“v”:1
}
]
}

the array has 5575 elements (stars)

an image of the blueprint:
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“large”,“data-tempid”:“temp_139251_1527802320210_778”}[/ATTACH]

so when it runs - it crashes UE4, nothing is printed (UE4 freezes before the crash) and then it tells me that I exceeded the max number of UObjects (set to 8+ million)
In otherwords - how on earth is this creating 8+ million UObjects when it is supposed to loop no more than 5575 times?

Thanks

I admire this article for the well-researched content and excellent wording. I got so involved in this material that I couldn’t stop reading. I am impressed with your work and skill. Thank you so much.

I urgently need missing Linux binaries for 4.19.2.

They are missing, even when building from the github source. Please ASAP I have a live game with paying users relying on this.

Is it possible to convert an asset reference and store that as a string? Kind of like the “Export as JSON” for the datatables". And also then read the json string value and convert that back again to an actual texture reference.
Edit: I got it working, had to do a few small c++ blueprintlibrary functions for this.

Amazing Plugin!
I tried to create a full blueprint project Only using this plugin.But when I package / build, the error like “Visual Studio 2017 must be installed in order to build this target” showed up .How can I solve this problem?Thanks.
Also when I tried to package IOS,these showed up:
Remote compiling requires a server name. Please specify one in the Remote Server Name settings field.

How can I build/Package my project without Installing VS2017 or a MAC ?
Thanks.

This is great. Exactly what I needed. Bumping the version to 4.24 any time soon? Thanks.

Update is on the way. We’re wainting for plugin to be reviewed by Epic.