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

  • replied
    HI,
    Trying to work out how to use VaRest to create a POST request that needs to send username and password, to retrieve a JSON encoded list of data for a user from the server. Generally (using code) I would construct the post request like this:
    Request->SetHeader(TEXT("username"), "usernameString");
    Request->SetHeader(TEXT("password"), "passwordString");
    BUT cannot work out how, using Blueprints, to construct the request. Can anyone help? The VaRest documentation - i.e. the github wiki - isn't exactly helpful. Help much appreciated.

    Leave a comment:


  • replied
    I'm trying to use VaRest to fetch a JSON object from a webAPI. I see the JSON data show up in the console log, but I can't figure out how to get the data into something I can use in blueprints. The simple GET example on the github site doesn't seem to call the event handler. Is there a clear simple example, of doing a GET request and getting the resulting JSON data into something useful?

    Leave a comment:


  • replied
    Hello, after update the plugin to 1.1-r19 version, all unicode text shows like this: \u041d\u043e\u0432\u043e\u0431\u0440\u0430\u043d\u0435\u0446 whits latin symbols no problems. How to resolve this? Many thx.
    UPD: resolved. Fixed in source code.
    Last edited by Mr.Lachetti; 12-30-2017, 04:02 PM.

    Leave a comment:


  • replied
    I have a huge problem with tokens and the request header.
    After a successful login my server returns a valid token for future authorization.
    For authorization I set a header "Authorization" and give it the token as value.

    When I copy the token and pass it as a "Make Literal" String everything works finde, but when I store the token in a String variable and pass it as the header value the token is invalid.
    On the server the token seems to be OK but cannot be decoded correctly.

    Any ideas?

    Leave a comment:


  • replied
    So what happened to all the PARSE nodes for blueprints?
    I can't seem to do anything related to Auth or PARSE.
    Trying to learn these systems and not sure how to implement what I need now in UE 4.17.2

    Leave a comment:


  • replied
    Originally posted by brunogbrito View Post
    My Response Content is always empty on 4.18? anyone having this same issue?
    Yes, it's a deprecated field now. For valid responses use ResponseObj->Decode

    Leave a comment:


  • replied
    I have a problem, my json object does have the good format, but on my $_POST (yes in php) i don't have params which is arrays.
    Is any problem with passing arrays ?

    [EDIT] I found a solution : encode as json string my object containing array then pass it to a string field of the request object. And on the server side, do a json_decode and assign the return value to $_POST
    Last edited by Monstreur; 11-03-2017, 03:18 PM.

    Leave a comment:


  • replied
    My Response Content is always empty on 4.18? anyone having this same issue?

    Leave a comment:


  • replied
    get bool field is always false. is that intended?

    Leave a comment:


  • replied
    I mean obviously the more important question is how do you set your blueprint background to a cat?

    Leave a comment:


  • replied
    Hmm I am attempting to test out VaRest with UE 4.17 Preview-2 with no luck compiling the plugin so far.
    Any advice? Getting some compile errors in VS:

    "
    Error C2039 'bIsArray': is not a member of 'FEdGraphPinType' Game H:\Unreal Projects\Game\Plugins\VaRest-develop\Source\VaRestEditorPlugin\Private\VaRest_BreakJson.cpp 72
    "

    "
    Warning C4996 'UEdGraphSchema_K2::SetPinDefaultValueBasedOnType': SetPinDefaultValueBasedOnType is deprecated due to confusing name, call SetPinAutogeneratedDefaultValue Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. Game H:\Unreal Projects\Game\Plugins\VaRest-develop\Source\VaRestEditorPlugin\Private\VaRest_BreakJson.cpp 184
    Warning C4996 'UEngine::GetWorldFromContextObject': GetWorldFromContextObject(Object) and GetWorldFromContextObject(Object, boolean) are replaced by GetWorldFromContextObject(Object, Enum) or GetWorldFromContextObjectChecked(Object) Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. Game H:\Unreal Projects\Game\Plugins\VaRest-develop\Source\VaRestPlugin\Private\VaRestLibrary.cpp 73
    Warning C4996 'UEngine::GetWorldFromContextObject': GetWorldFromContextObject(Object) and GetWorldFromContextObject(Object, boolean) are replaced by GetWorldFromContextObject(Object, Enum) or GetWorldFromContextObjectChecked(Object) Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. Game H:\Unreal Projects\Game\Plugins\VaRest-develop\Source\VaRestPlugin\Private\VaRestRequestJSON.cpp 228
    "

    Basicly there are a lot of deprecated variables in struct FEdGraphPinType :

    private:
    /** DEPRECATED(4.17) Whether or not this pin represents a map of keys to values */
    UPROPERTY()
    uint8 bIsMap_DEPRECATED:1;

    /** DEPRECATED(4.17) Whether or not this pin represents a set of (unique) values */
    UPROPERTY()
    uint8 bIsSet_DEPRECATED:1;

    /** DEPRECATED(4.17) Whether or not this pin represents an array of values */
    UPROPERTY()
    uint8 bIsArray_DEPRECATED:1;


    " DEPRECATED(4.17, "Use version that takes PinContainerType instead of separate booleans for array, set, and map")"


    Solution:

    In VaRest_BreakJson.cpp (72)

    Change:
    bool bIsArray = Pin->PinType.bIsArray;

    To:
    bool bIsArray = Pin->PinType.IsArray();

    This seems to work. Still has a warning tho:


    Warning C4996 'UEdGraphSchema_K2::SetPinDefaultValueBasedOnType': SetPinDefaultValueBasedOnType is deprecated due to confusing name, call SetPinAutogeneratedDefaultValue Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile. \VaRest-develop\Source\VaRestEditorPlugin\Private\VaRest_BreakJson.cpp 184
    Last edited by MADHOUSE; 07-25-2017, 11:09 AM. Reason: Solution

    Leave a comment:


  • replied
    Originally posted by MADHOUSE View Post
    Reported an issue on github, this version fails when building/packaging the shipping release build.
    https://github.com/ufna/VaRest/issues/105

    Edit: Seems to be a simpel solution. This problem is solved by opening VaRestPlugin.uplugin and changing engine version from 4.11.0 to 4.16.0 and this allows the shipping release build to complete without errors.
    Thx that works
    Last edited by michalss; 07-10-2017, 05:29 PM.

    Leave a comment:


  • replied
    please can anyone make source compatible with 4.16.2 ? Thx

    Leave a comment:


  • replied
    Just an off the wall question as it kind of sort of pertains to VaRest (or at least, would use it).. but how would I go about getting an individual (would prefer random) stock price? heh.. it is not our duty to ask why, but our duty to just do.

    Leave a comment:


  • replied
    Hey,How can i use this to get result from my endpoint ?
    For exemple my endpoint is http://test.com/test/
    It returns {"data":{"errors":0}}

    how can i use blueprint to get errors:0 ??

    Leave a comment:

Working...
X