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

**URL:** <https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725>\
**Category:** Game Development\
**Tags:** unreal-engine\
**Created:** [July 17, 2014, 12:32am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725 "2014-07-17T00:32:03Z")\
**Posts on this page:** 20\
**Page:** 3

<div class="post-metadata">

**Author:** ![KillerSneak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/killersneak/32/754802_2.png) [@KillerSneak](https://forums.unrealengine.com/u/KillerSneak)\
**Post date:** [March 22, 2015, 12:04pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/41 "2015-03-22T12:04:31Z")

</div>

Unhook the RequestCompleteCopy (red line) and see how it’s run. It’s just a “custom event” but by default it’s set not to replicate. For online use it should replicate and be run from/by the server not the user.

EDIT:  
Does it work with 4.7.3? And do I still need to start a code template or does it work with Blueprint only projects as well?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d6e3465a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d6e3465a](https://forums.unrealengine.com/u/anonymous_user_d6e3465a)\
**Post date:** [April 14, 2015, 7:53pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/42 "2015-04-14T19:53:12Z")

</div>

I have the same problem regarding this situation.

I have something like that, as you…

{“FirstName”:“Awesome”,“LastName”:“Plugin”,“HighScore”:“642”},  
{“FirstName”:“Facing”,“LastName”:“Worlds”,“HighScore”:“377”},  
{“FirstName”:“YouBe”,“LastName”:“Dead”,“HighScore”:“321”}]

but I can’t read the content of this array.

Any workaround??

Thanks.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a4cc7aca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a4cc7aca](https://forums.unrealengine.com/u/anonymous_user_a4cc7aca)\
**Post date:** [April 22, 2015, 11:27pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/44 "2015-04-22T23:27:27Z")

</div>

Is it possible to send a request with body content with this plugin? I need to send a post request to get an access token.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b16017bb](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b16017bb](https://forums.unrealengine.com/u/anonymous_user_b16017bb)\
**Post date:** [April 23, 2015, 7:51am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/45 "2015-04-23T07:51:33Z")

</div>

\*\*@  
\*\*  
make sure your json looks like this

```auto

{  
   "data":  
      {  
         "FirstName":"Awesome",
         "LastName":"Plugin",
         "HighScore":"642"
      },
      {  
         "FirstName":"Facing",
         "LastName":"Worlds",
         "HighScore":"377"
      },
      {  
         "FirstName":"YouBe",
         "LastName":"Dead",
         "HighScore":"321"
      }
   ]
}

```

this can be parsed with “Get Object Array Field” using data as the Field Name

**@ Thumper**

yes this should be possible. To set post date you can:

“Construct Json Request” (verb=POST) -\> Get Request Object -\> Set String Field

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a4cc7aca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a4cc7aca](https://forums.unrealengine.com/u/anonymous_user_a4cc7aca)\
**Post date:** [April 23, 2015, 6:58pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/46 "2015-04-23T18:58:10Z")

</div>

So apparently a .net web api cant accept JSON to get an access token ☹

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a4cc7aca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a4cc7aca](https://forums.unrealengine.com/u/anonymous_user_a4cc7aca)\
**Post date:** [April 23, 2015, 9:07pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/47 "2015-04-23T21:07:19Z")

</div>

So is there a way to post a request with body content in x-www-form-urlencode format?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a4cc7aca](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a4cc7aca](https://forums.unrealengine.com/u/anonymous_user_a4cc7aca)\
**Post date:** [April 23, 2015, 11:07pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/48 "2015-04-23T23:07:40Z")

</div>

I had to mod the plugin a little to send a request with a body. The function in the ihttp interface is called SetContentAsString

---

<div class="post-metadata">

**Author:** ![Ericode](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ericode](https://forums.unrealengine.com/u/Ericode)\
**Post date:** [May 4, 2015, 2:51am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/49 "2015-05-04T02:51:09Z")

</div>

Hello, I would first like to thank you for making this plugin. It works great! My only concern is I am trying to connect my game launcher to the same php script I am using to get the login info. Does the json look something like this?  
{  
“password”: “www”,  
“username”: “qqq”  
}

or does it have to include “data”: like @ has it?

---

<div class="post-metadata">

**Author:** ![Parvan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/parvan/32/1137391_2.png) [@Parvan](https://forums.unrealengine.com/u/Parvan)\
**Post date:** [June 2, 2015, 1:19pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/50 "2015-06-02T13:19:28Z")

</div>

![03fc66c0f92b0088ebf3408efe13cba7ca8ba723.jpeg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/3/03fc66c0f92b0088ebf3408efe13cba7ca8ba723.jpeg)

Link to the Image - ![json-array.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/0/3/03fc66c0f92b0088ebf3408efe13cba7ca8ba723.jpeg)&d=1433250938

Record stored in CouchDB’s database. This is where the \_id and \_rev come from.  
{  
“\_id”: “69b3d20dc682993f4ba9f349bb001582”,  
“\_rev”: “1-e33cc1b08ab503c6200abea3ae49c7d3”,  
“array”:  
{  
“object0”: “value1”  
},  
{  
“object1”: “value2”  
},  
{  
“object2”: “value3”  
},  
{  
“object3”: “value4”  
}  
]  
}

I really appreciate your plugin. My small contribution is an example of how to do this with arrays. I saw a couple people asked. I tried a few different methods which didn’t work. Cheers! (Integrated with CouchDB)

There were a few moments where I had to mess with the nodes for a while to figure out how the plugin works. You should be able to answer most questions by messing with the plugin for a few hours.

---

<div class="post-metadata">

**Author:** ![Parvan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/parvan/32/1137391_2.png) [@Parvan](https://forums.unrealengine.com/u/Parvan)\
**Post date:** [June 9, 2015, 1:13am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/51 "2015-06-09T01:13:17Z")

</div>

Sorry to bother you ufna. Thanks for the awesome plugin!

I’m making multiple requests in succession. It seems like the requests need to be spaced 1 seconds apart for them to work. (Trying even .5 seconds fails)

I tired putting the variables into an array like pictured below.

Also, I made sure it wasn’t a problem with my server (Using CouchDB) by writing a quick script to make 10 requests instantly. The server responded to all of the requests.

Any ideas? I’m not able to put custom events for onrequestcomplete / fail inside a function. I have a feeling it would work that way. Anyone have ideas on a solution for this? I’ve tried a lot of different things for around 6 hrs.

 ![json_help.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/2/2/22d3ecc8fb8d9911c64a8a1b3c35676f3226b3a8.jpeg)  
Request Test SH  
 ![json-sh.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/8/f81c92c7f552b33ad4923fd9ca5e0f831e59a284.jpeg)  
SH Results  
 ![json_test.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/8/78e33b5fe4b855375f73c6fb8a0f8e4937472ad5.jpeg)  
UE4 output on 5 consecutive requests  
 ![json-ue4-response-5players.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/1/e112c9e24451baa4270e0b713845360f294e7486.jpeg)  
UE4 output on 10 consecutive requests  
 ![json-10request.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/7/0/70bc4d5367bb4b103d30c2da971c693f47a24a03.jpeg)  
UE4 output on 10 requests with 1 second delay  
 ![json-10request-1seconddelay.JPG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/4/e/4ef4ab1621e218a7fd559cfa756e1dec98301187.jpeg)

Got any ideas on a method without having to space the requests or a BP method of handing off requests to separate request branches if they appear in quick succession? That’s the solution I might end up using.

---

<div class="post-metadata">

**Author:** ![Parvan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/parvan/32/1137391_2.png) [@Parvan](https://forums.unrealengine.com/u/Parvan)\
**Post date:** [June 12, 2015, 9:50pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/52 "2015-06-12T21:50:14Z")

</div>

I don’t know if what I said made my sense. My apologies.

I ended up using a method like this…

Created a struct to hold all the JSON info. Made an event which saves each request as a struct in an array.

Then I have a delayed “for each” in array (manually, not the utility node) which fires the json plugin stuff. At the end, before Bind Event to OnGetResults the Struct entry is removed.

This keeps multiple requests “spaced” with a time delay. Sometimes it still fails to send the data. I’m going to have to use other methods for error correction.

Data -\> To Struct -\> Struct to Array -\> Custom Delayed For Each Loop on Event BeginPlay -\> JSON Request Using Struct Data -\> Removes Struct From Array -\> On For Each Completed Restart Loop

This creates basically throttles the plugin to 1 JSON request per second which usually returns data as it should.

I wonder why the plugin returns nothing on requests in quick succession? Both VaRest and JSONQuerry do this. I used a script to make sure it wasn’t a problem with my server. I’m posting this as food for thought. Thanks for the awesome plugin! 🙂

---

<div class="post-metadata">

**Author:** ![Lyons\_Den](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lyons\_Den](https://forums.unrealengine.com/u/Lyons_Den)\
**Post date:** [June 15, 2015, 1:27am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/53 "2015-06-15T01:27:45Z")

</div>

What I did for multiple calls was have all the requests bind to the same OnComplete OnFail binds. I use an enum to tell which call was just made. I then Switch on the enum and send the handlers to a different class. Here are my BPs.

Here is an example call. I edited the Plugin a little to work with Play Fab. All my obect creation is behind the scenes to make blueprints readable. It is still the same process though. This is a request.

![42c3d6dba7ef5c96bfe204b195222c9492eb18b2.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

The next image is on the event graph of the same object. I use an enum to decide where the response should be sent.

![575a4ed895897a3eb3eb86a8c6e4ab9533e3245a.jpeg](https://d1ap1mz92jnks1.cloudfront.net/images/transparent.png)

I am actually in the progress of adding the entire PlayFab API into a modified VaRest plugin. It simplifies the process alot.

- Josh

---

<div class="post-metadata">

**Author:** ![dsenter](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dsenter](https://forums.unrealengine.com/u/dsenter)\
**Post date:** [June 15, 2015, 10:01pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/54 "2015-06-15T22:01:30Z")

</div>

I can’t seem to get this plugin working. Whenever I drop the plugin into my plugins directory and then enable the plugin, UE4 tells me I need to recompile when I open the project. When the recompile fails, UE4 says I need to rebuild it manually. How do I do that?

---

<div class="post-metadata">

**Author:** ![Furentes](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Furentes](https://forums.unrealengine.com/u/Furentes)\
**Post date:** [June 23, 2015, 9:47am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/55 "2015-06-23T09:47:32Z")

</div>

> [@dsenter;312157](#):
>
> I can’t seem to get this plugin working. Whenever I drop the plugin into my plugins directory and then enable the plugin, UE4 tells me I need to recompile when I open the project. When the recompile fails, UE4 says I need to rebuild it manually. How do I do that?

Got the same problem. Please help 😛

---

<div class="post-metadata">

**Author:** ![Lyons\_Den](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lyons\_Den](https://forums.unrealengine.com/u/Lyons_Den)\
**Post date:** [June 23, 2015, 12:02pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/56 "2015-06-23T12:02:38Z")

</div>

Did you grab the release or the master version. I believe one has binaries that you add to your unreal install directory the other you build from source. Are you using a source built game or one that is just using blueprints?

If your using blueprints only grab the release version of the plugin and follow the instructions on the wiki page for his plugin. If you are building from source then once you drop the plugin in the plugins folder right click on your uproject file and regenerate visual studio files. Open up the visual studio solution and rebuild your game and the plugin will be rebuilt also.

-Josh

---

<div class="post-metadata">

**Author:** ![xulture](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/xulture/32/921486_2.png) [@xulture](https://forums.unrealengine.com/u/xulture)\
**Post date:** [July 15, 2015, 3:57pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/57 "2015-07-15T15:57:27Z")

</div>

Heya,

Thanks for this awesome plugin!

I’ve just sent a pull request for a small change to add Request itself as a parameter of Complete/Failed events [Added parameter to callbacks with payload of request by xulture · Pull Request #31 · ufna/VaRest · GitHub](https://github.com/ufna/VaRest/pull/31)

This should make it easier to reference which requests have completed, in cases when multiple concurrent requests may be processing.

Cheers,

---

<div class="post-metadata">

**Author:** ![Parvan](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/parvan/32/1137391_2.png) [@Parvan](https://forums.unrealengine.com/u/Parvan)\
**Post date:** [July 26, 2015, 7:13am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/58 "2015-07-26T07:13:59Z")

</div>

Thanks for the idea Lyons! I will try that. My solution seems a bit complicated. Also, xulture, thanks for those changes!

Also, I had to switch to the current development branch for the plugin to work with UE 4.8 in case anyone else is wondering. It would crash otherwise when running more than one player instance within the editor.

---

<div class="post-metadata">

**Author:** ![MADHOUSE](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MADHOUSE](https://forums.unrealengine.com/u/MADHOUSE)\
**Post date:** [July 31, 2015, 11:37pm UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/59 "2015-07-31T23:37:00Z")

</div>

I tried to follow the Parse Login tutorial, but there is no url to parse to? I dont get it ☹ Anyone who can help? I think I have got the plugin working. When trying to do a get request it prints the content of the file on the server in the log but returns no response string to the game.  
im trying to do a simple login screen.

---

<div class="post-metadata">

**Author:** ![ufna](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/ufna/32/1194675_2.png) [@ufna](https://forums.unrealengine.com/u/ufna)\
**Post date:** [August 3, 2015, 8:54am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/60 "2015-08-03T08:54:06Z")

</div>

I’ve released all new changes as 1.1-rc8 release: [Release VaRest 1.1-rc8 · ufna/VaRest · GitHub](https://github.com/ufna/VaRest/releases/tag/1.1-rc8)

Big thanks to all guys who contributed to VaRest! 🙂

---

<div class="post-metadata">

**Author:** ![GCRev](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GCRev](https://forums.unrealengine.com/u/GCRev)\
**Post date:** [August 13, 2015, 7:10am UTC](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725/62 "2015-08-13T07:10:41Z")

</div>

Here’s how you can use a “where query” for Parse for those of you wondering, because I certainly was.  
If you look at [Parse documentation](https://www.parse.com/docs/rest/guide#queries-query-constraints) for this everything seems to work as explained there.  
This method works for me and I haven’t found any issues yet.

- Set up a Parse Request Object with the “GET” verb and X Www Form Urlencoded" like you would normally.
- “Parse Class” is whichever class you want to submit a query for. You can use the “Construct where query” method if you want, but I find this quicker.

NOTE: I had to use the PercentEncode function in order for this to work my iOS device.

 ![whereQueryExample.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/c/a/ca7905e71cc8232973cf3d43c45a936216a801c1.png)

[Previous page](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725.md?page=2)

[Next page](https://forums.unrealengine.com/t/plugin-http-s-rest-blueprintable-json-query-and-parse-api-manager-varest/7725.md?page=4)
