Announcement

Collapse
No announcement yet.

[Plugin] Http/s REST, blueprintable JSON and Parse REST API manager at once (VaRest)

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Plugin] Http/s REST, blueprintable JSON and Parse REST API manager at once (VaRest)

    Hi there

    I've just released the first public version of plugin that makes REST server communications pretty easier.



    VaRest is the plugin for Unreal Engine 4 that makes REST server communications simple to use with full Json query support.

    Key features:
    • Flexible Http/Https request management with support of different Verbs and Content Types
    • No C++ coding required, everything can be managed via blueprints
    • Blueprintable Json wrapper with almost full support of Json features: different types of values, arrays, both ways serializarion to FString, etc.
    • Blueprintable FJsonValue wrapper - full Json features made for blueprints!
    • Parse REST API manager to start working with Parse out of the box!


    Current version: 1.1 R 9

    Plugin is available under MIT open-source license, you can download it here. Source code is available on Github: https://github.com/ufna/VaRest .

    Check the Wiki for plugin usage examples and installation notes.

    I'll be thankfull for plugin testing, feedback and new ideas how to improve the plugin!
    Last edited by ufna; 09-20-2015, 11:25 AM.

  • replied
    Hey,
    First of all I want to thank you for the plugin! working great so far.

    I am trying to implement a PATCH request to a server, but can't seem to get it to work. it crashes with the errors provided in the pictures.
    it seems there is no support for PATCH method in the libcurl library..
    I would be happy to know if any of you have encountered the same issue, and how did you manage to get around it?

    Any help will be highly appreciated!

    the blueprint implementation:
    Click image for larger version

Name:	2.png
Views:	1
Size:	91.0 KB
ID:	1644532
    crashlog:
    Click image for larger version

Name:	1.png
Views:	1
Size:	135.5 KB
ID:	1644530
    class in cpp:
    Click image for larger version

Name:	3.png
Views:	1
Size:	73.2 KB
ID:	1644531

    Leave a comment:


  • replied
    Request always fails in HTML Shipping


    Request always fails in HTML Shipping. My logic is shown in the attached image. Can you please help here.

    I tried with UE 4.19, UE 4.20, UE 4.21
    Attached Files
    Last edited by L34D3R; 03-27-2019, 08:30 AM.

    Leave a comment:


  • replied
    SOLVED: I fixed my own problem I am editing post to reflect solution.

    My application of this plugin is retrieving information from Elasticsearch using its rest api. I have been able to send a simple get request and confirm that I can reach my server, but I cannot figure out how to use the blueprint nodes to construct my request. I am used to using the curl command when sending json to the api and so that is how I will show you what I am trying to accomplish. I am trying to do the equivalent of the following. curl -X GET "localhost:9200/twitter/_search" -H 'Content-Type: application/json' -d'
    {
    "query" : {
    "term" : { "user" : "kimchy" }
    }
    }
    '

    I tried to understand how to send this using this blueprint plugin but have become very frustrated and thus I am asking for help. I think I need to somehow set the request body but I am not sure how to do this. If anyone is willing to help that would be greatly appreciated.

    What I was doing wrong was not setting the request object after making the request. I also learned that the request object needed to be a json object using the field body and then my above json as the value(using the construct json object combined with set string field), I am attaching a quick screenshot of this for anyyone in the future. Click image for larger version  Name:	Screenshot-168.png Views:	3 Size:	113.1 KB ID:	1582817
    Last edited by ipninichuck; 02-09-2019, 10:30 PM.

    Leave a comment:


  • replied
    Having a little bit of a problem parsing the data within the blueprints my API is returning this as a JSON object but i can't seem to figure out how to break the object up to use the data.

    API Response:
    Code:
     
     {"playerinfo":{"Friends":"none","Lifetime_Score":0,"Facebook_ID":"0","User_ID":141,"Stars":"0","UserName":" ","Google_ID":"0"},"scores":{"Level":1,"Chapter":1,"Score":200,"Player_ID":141}}
    Blueprint is attached. Thanks in advance this plugin has saved me a lot of time!
    Attached Files

    Leave a comment:


  • replied
    Will this get updated to 4.21?

    Leave a comment:


  • replied
    I'm currently trying to use VaRest to login to a server via a third party api.

    I should be able to login by either processing a cURL or by passing headers and a body via a url.
    I've not be able to get VaRest to post correctly to the server.

    If I copy the cURL link from the api dashboard and into the Process URL node then the request fails and i get the same if i follow the logic in the attached screenshot. When i'm using the Set String Request Content, i'm only doing so because I couldn't find anything else relating to adding body content.

    I have experience working with PHP before inside of Unity but this is my first time using posting JSON so i'm sure there is something really simple that i'm missing.

    EDIT:
    So it seems to be working now using the Set String Field and Set Fields. How ever nesting a JSON field inside a field adds in square brackets and not curly brackets along with another formatting issue. Can anyone suggest how to get around this. I'll attach a screen shot.
    Attached Files
    Last edited by jeffries7; 09-18-2018, 11:42 AM.

    Leave a comment:


  • replied
    Hey @ufna
    I just wanted to ask if it is possible to use the Bing Speech API with your Plugin.
    It works like this: First you send a Authentication Key and audio file to the server and then you get a response in form of a JSON.
    Does this work with your plugin?

    Leave a comment:


  • replied
    Click image for larger version

Name:	VaRestHelp.jpg
Views:	1
Size:	91.1 KB
ID:	1520546


    I am having some trouble doing this in C++
    any help to do the BindEvent To OnRequestComplete Function To another Function call "TempFunction"


    this is what I have so far::

    FLatentActionInfo latentInfo;
    Request = UVaRestRequestJSON::ConstructRequestExt(this, ERequestVerb::GET, ERequestContentType::x_www_form_urlencoded_url);
    Request->ApplyURL(UrlGetIp, RequestObject, this, latentInfo);
    Request->OnRequestComplete;

    been trying for over 4 hours to figure out.

    Leave a comment:


  • replied
    This is working perfectly so far, except, I don't get any difference between the 'Encode JSON' node and the 'Encode JSON to Single String' node. Both are creating single-line JSON nodes, and as I am exporting these to external .json files this is a bit messy.

    Anyone else experiencing this on 4.20?

    Leave a comment:


  • replied
    Request fails in packaged build for android

    Hi,
    I packaged the android apk and installed on Moto G5 S Plus. When i request the url on button. It always fails.

    I also disabled the Verify Peer. But it didn't work.




    Plugin Version:
    "Version" : 22,
    "VersionName" : "1.1-r22",

    Engine Version: 4.19.1 Release

    Log File : https://github.com/ufna/VaRest/files/2144949/mylog.log
    Attached Files

    Leave a comment:


  • replied
    I really can use some help here:

    on the web side I encode my Data and it returns some thing like this:
    {"status": "online","username": "shakoor","email": "shakoor@sh.com","banned": "no","kills": "0","wins": "0"}
    so i will use "Get Field" and it works fine but when I have some thing like this on the server:
    {"status": "online","username": "shakoor","email": "shakoor@sh.com","banned": "no","kills": "0","wins": "0"}{"status": "online","username": "shakoor2","email": "shakoor@sh.com2","banned": "no","kills": "0","wins": "0"}

    So I have more than 1 json object and let's say I want to show the second result
    I just don't know how proceed
    you see the same code works fine for 1 json object but when it is more than 1 it doesn't work
    so please please
    help me
    all I want to do is to have list of specific data on the server encoded as json and show them all
    that is it
    "GetResponseContent" will print everything I guess, but it does not work anymore (Deprecated)

    thank you again for your attention

    Respects

    Leave a comment:


  • replied
    when I wanted to use "GetResponseContent" It gives me This notification:

    DEPRECATED: please use GetResponseContentAsString() instead

    and when I use that it just shows this:
    {}

    so please help me I reeeaaaaallyyy need to use your plugin in Unreal Engine 4

    Just show me to the direction to learn

    Respects

    Leave a comment:


  • replied
    Originally posted by ufna View Post

    Yes, it's a deprecated field now. For valid responses use ResponseObj->Decode
    I have been trying to GET / POST data using only blueprints, but it is not working... I tryied "GET RESPONSE OBJECT" then "DECODE JSON", but the decode only returns a boolean. Shouldn't it return a string? How do I access the data from the website?

    I went through the documentation, but it is outdated since the "GET RESPONSE CONTENT" is deprecated.

    Thank you

    Leave a comment:


  • replied
    Just posting to thank the OP for VaRest. Spent the day setting it up and coding a php/mysql login system. Worked perfectly. Thank you.

    Leave a comment:

Working...
X