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

    Originally posted by SlyFly7 View Post
    Hi Everyone!

    I only have a one simple problem, I don;t know how to capture whole Json data received from a website into separate variables inside unreal.
    Could someone show me and everyone an example or point to the right direction? I saw few people asking and they were ignored.

    Thanks a lot!
    I haven't had time to make a full guide yet, but I've got a screen shot on my blog that shows how I was doing it. You'll need to know the field names in your JSON though.

    http://blog.patrickbarnhardt.info/20...o-wordpress-2/

    Check the very first image.

    Comment


      Hi Patrick!

      Thanks for replying and giving a hand!

      Can you show an image of what you have before the get field functions?
      I would really like to know and see what is your way of processing the Json request and how are you exactly getting the response.
      Could I also ask about the precise formatting of your Json? Whether you have nested or simplified. etc.

      I would really appreciate it, I have been investigating for two weeks, scouting the interwebz but to no avail.

      I appreciate your time, I will be following your blog to see how you try to implement varest use with Wordpress !

      Thanks again!
      Lucas

      Comment


        Greetings! Awesome plugin, but im having a problem. Is it not possible to set the header?
        When attempting this, no header at all is present in the GET request.

        Click image for larger version

Name:	headless.jpg
Views:	1
Size:	197.6 KB
ID:	1114510

        There must be some way to set the header right? Im not sure what im doing wrong here.
        Thanks for any advice!
        /Best Regards
        ______________________________________________
        https://www.facebook.com/madhousesoftware
        Where sanity is a virtue

        Comment


          Oh, never mind! I just found the solution, turns out I needed an empty content type for this GET request. Im very novice with this json business
          The header shows up as expected.

          Thanks for the awesome plugin!
          /Best Regards
          ______________________________________________
          https://www.facebook.com/madhousesoftware
          Where sanity is a virtue

          Comment


            Does this plugin have any documentation? All I can find is 2-3 over-assuming and fragmented blueprint screenshots and a few lines on GitHub. And a link to a an old non-working UE4 project... Why release something like this to the community and not document it? It should come with a warning: Yes, please use my plugin, but you're better off writing your own plugin rather than spending hours and hours trying to solve a puzzle simply based on arbitrary naming of BP nodes, if you can find them that is... It's better to charge $10-$20 and actually document the plugin and properly support it.

            Comment


              Hi folks, I really want to get this working.. does anyone have an idiots guide to getting something up and running? So far I've installed the plugin and created a player controller blueprint as in the image example.. Clearly there is more to do (apart from the URL) ... help? please?

              I should say, all I would like to do at this stage is get a height map from a server and create the geometry... how hard can it be... Ha! (irony)
              Last edited by Johnnyx; 09-06-2016, 08:21 AM.

              Comment


                Originally posted by SlyFly7 View Post
                Hi Patrick!

                Thanks for replying and giving a hand!

                Can you show an image of what you have before the get field functions?
                I would really like to know and see what is your way of processing the Json request and how are you exactly getting the response.
                Could I also ask about the precise formatting of your Json? Whether you have nested or simplified. etc.

                I would really appreciate it, I have been investigating for two weeks, scouting the interwebz but to no avail.

                I appreciate your time, I will be following your blog to see how you try to implement varest use with Wordpress !

                Thanks again!
                Lucas
                Unfortunately I don't have that version of that project anymore, I did a rebuild and haven't reconstructed the system just yet so I can't provide anything before that right now.
                As for the formatting of the JSON, it's just the default spit out by the wordpress API. It seemed to work fine.

                Comment


                  Assigning JSON GET response field values to blueprint variables

                  After going through all the entries on this thread I've seen several people ask about parsing the response from a GET call back into variables, but don't see any clear answers. I do a GET on my server and receive a response back of the form

                  {"ItemsMap":[{"ItemId":"TankBInput","AccessRight":"2","ItemType":"2"},{"ItemId":"FloatSwitch","AccessRight":"0","ItemType":"0"}]}

                  I want to extract the value of ItemId from the first entry of the ItemsMap array. I can't figure out the proper collection of boxes to do so. Is there an example that illustrates this in Blueprint or C++? I figured I just needed to do a Get Response Object in response to an OnComplete event, set that to a Json Buffer, and then Get Object Array Field with ItemsMap as the field name, but can't figure out the proper function to extract the first item of the array to get to the ItemId field. The image show's what I've got in blueprint for the decomposition so far. I'm new to blueprint, so a lot of this blueprint programming is hit and miss.

                  Can somebody explain how I'd complete this assignment? I also wonder if this wouldn't be easier in C++, but I don't see any examples of VaRest that are C++ based. Any pointers are appreciated.
                  Attached Files

                  Comment


                    EDIT2: I got a problem when I want tu use https request, when I connect to my website in Chrome with https://... it works but when I do this from the plugin I get stuck in Bind Event to OnRequestComplete, I use wireshark to see what happend:



                    Event
                    EDIT: It's ok I found the solution this plugin is reaaly impressive ^^ now I would like to know if I can use blueprint varest on a dedicated server or in C++ class ?

                    Hello everyone, I found this plugin and look very amazing but I have a question for you. There is someone who already use this plugin with an authentification system based on JSON Web Tokens (from https://jwt.io/) ?

                    I explain why, i'm currently using jhipster to generate a project based on springboot and the authentification system of JWT and I would like to know if someone already done this to explain me a way to explore. I sucess to send post/get request but I think it's more complex than this to use the JWT concept by write a header for exemple with a secret key.

                    Any tips is good to have !

                    Thank in advance.
                    Last edited by amnedge; 10-04-2016, 10:41 PM.

                    Comment


                      VaRest login system with PHP/MySQL

                      Hi guys,

                      I need help. I am doing a login system using MySQL, PHP and VaRest and the result that PHP is returning is not being accepted by VaRest. I will demonstrate below whole process I did:

                      PHP Class function to encode Json to send to VaRest

                      PHP Code:
                      public static function efetuarLogin($username$pass)
                          {
                              require_once 
                      'MySQLDC.php';
                                  
                              
                      $query "CALL SP_LoginUser('$username', '$pass');";
                                  
                              
                      $mysql = new MySQLDC();
                                  
                              
                      $result $mysql->execSPForDataSet($query);
                                  
                              
                      $JSON json_encode $result );
                          
                              if(
                      $JSON=="null"){
                                  
                      $JSON="[]";
                              }
                          
                              return 
                      '["data":' $JSON ']';
                          } 
                      and here the images of my BP to parse the result













                      and the Widget BP to send information to system to check if true or not and parse





                      The error I reviced



                      Anyone cam help-me? what am I doing wrong?

                      Thanks
                      Attached Files
                      Last edited by Damien2k15; 10-19-2016, 09:27 AM. Reason: other

                      Daniel Drummond
                      3D Artist - 3D Architectural Visualization

                      Comment


                        Damien try to use curly braces instead of regular braces, in the past I found that there is a limitation of the Unreal JSON parser (which VaRest uses) that needs the whole JSON string to be sorrounded by curly braces (even if the original JSON string was JSON correct). Try to answer in this way:

                        Code:
                        {"data":[{"QUANT":"1"}]}
                        Also, you may have to change the GetObjectArrayField block for a GetArrayField, but I am not sure about this.

                        Comment


                          You're using bad json format. It should be {} instead of [] in map.
                          Developer. Bass player. Cats owner. Unreal Engine addicted. Check my.alyamkin.com
                          [Plugin] VaRest - REST API with blueprintable JSON plugin
                          [Plugin] VaTexAltas - simple way to use texture atlases for UMG

                          Comment


                            Originally posted by SuperRey View Post
                            Damien try to use curly braces instead of regular braces, in the past I found that there is a limitation of the Unreal JSON parser (which VaRest uses) that needs the whole JSON string to be sorrounded by curly braces (even if the original JSON string was JSON correct). Try to answer in this way:

                            Code:
                            {"data":[{"QUANT":"1"}]}
                            Also, you may have to change the GetObjectArrayField block for a GetArrayField, but I am not sure about this.
                            Hi SuperRey, thank for your answer I going try and post here if works or not.

                            Daniel Drummond
                            3D Artist - 3D Architectural Visualization

                            Comment


                              Originally posted by ufna View Post
                              You're using bad json format. It should be {} instead of [] in map.
                              Hi ufna, thanks for your answer I go make this change and post here if works or not.

                              Daniel Drummond
                              3D Artist - 3D Architectural Visualization

                              Comment


                                Hi ufna and SuperRey

                                After read and implement both ideas I put the system works fine. Thanks both!!! Here is what changed in my code, both BP and in PHP.



                                PHP

                                PHP Code:
                                public static function efetuarLogin($username$pass)
                                    {
                                        require_once 
                                'MySQLDC.php';
                                            
                                        
                                $query "CALL SP_LoginUser('$username', '$pass');";
                                            
                                        
                                $mysql = new MySQLDC();
                                            
                                        
                                $result $mysql->execSPForDataSet($query);
                                            
                                        
                                $JSON json_encode $result );
                                    
                                        if(
                                $JSON=="null"){
                                            
                                $JSON="{}";
                                        }
                                    
                                        return 
                                '{"data":' $JSON '}';
                                    } 
                                Attached Files

                                Daniel Drummond
                                3D Artist - 3D Architectural Visualization

                                Comment

                                Working...
                                X