1
0
-1

Hi guys,

I just wanted to make use of the JSON Post Plugin (to authorise and get data from a JSON feed - not to post a payload).
However, unlike the original screenshot in the Joget Marketplace, the actual screenshot of the plugin looks like this and does not have Request Headers parameters:

I know that the payload plugin in the marketplace has the Request Headers.
Could you please add this part of the plugin to the JSON Post Plugin so that one can authorise the request against JSON APIs?
Or am I missing something?

Many thanks and kind regards,

Eric

    CommentAdd your comment...

    3 answers

    1.  
      3
      2
      1

      Hi there,

      Please try to download the plugin again. It should work now.

      Thanks.

      1. Eric

        Hi Hugo , Thanks - could you quickly explain what has changed in the new version? I still can't enter any Request Header parameters (-H) - only normal parameters (-d). However, this is possible in the JSON POST Form (Payload) Plugin and very useful for some APIs. How would I add a custom Request Header in the new version that was uploaded? Cheers!

      2. Hugo

        Hi Eric, Please download from the same link again. There was a file mistaken for previously. This current one will support request headers. Cheers

      3. Eric

        Hi Hugo , I just updated the plugin from the same link and it looks like it's all there! :) Thank you very much for the great support. I might share an example app to showcase the process to integrate / update external data from JSON APIs with Basic Authorisation shortly. (if all works well) Cheers!

      CommentAdd your comment...
    2.  
      2
      1
      0

      Hi Eric,

      There's a new improved JSON Tool in v6 Beta 2 with support for POST requests, request headers, payloads, debug mode, etc. You can check it out at http://blog.joget.org/2017/05/whats-new-in-joget-workflow-v6-beta-2.html

      Thanks!

      Best Regards
      Julian

       

      1. Eric

        Hi Julian, Awesome - I just saw that and it will make integrations a lot easier. I will letyou know if everything works as expected. Excited to see a debug mode because debugging errors has been really hard - especially with ssl requests. Thanks guys!

      CommentAdd your comment...
    3.  
      1
      0
      -1

      HI Hugo,

      I just noticed that a lot of my headaches seem to be caused by the JSON POST tool behaving the opposite of how it should behave:

      If the JSON Payload box is ticked then the parameters seem to be submitted as URL parameters and when it is unticked then they are submitted in the request body.

      Would be great if that could be fixed. (smile)

      1. Hugo

        Hi Eric,

        I tried to replicate what you said but it worked as expected. Please see the screenshots.

         

         

        Let us know if you can find anything.

        Thanks in advance!

        Hugo

      2. Eric

        Hi Hugo, You need to look at the actual POST request. When the box is ticket the parameters should be sent in the request body and when unticket they should be passed in the url. However, the opposite happens. You won't see it in the interface but in the actual request that is sent by the plugin. Should be a simple swap of conditions in the code. :)

      3. Hugo

        Hey Eric, I think you have mistaken about the meaning of "JSON Payload box". When ticked, data will be sent in a single JSON object. When it is not, it will be sent as normal form/post parameters. The whole idea of making POST call is to NOT put parameters as part of URL. If you want it to be part of URL, then you should be using the default JSON Tool which uses GET call. Hope this helps! Thanks. Hugo

      4. Eric

        Mh - that's weird, then why do I get "parameters cannot be passed as part of the URL" responses from APIs when I have the box ticked in the JSON POST Tool? Did you check that the actual POST requests are constructed correctly? Sorry to be a pain about these tools but I use them a lot for IoT apps at the moment and usually the requests work in Postman but they fail when using the plugins for a few different reasons. Happy to walk you through a couple of scenarios via skype / screenshare if you are interested. :) Cheers

      5. panda

        saw tht v6 json tool support custom payload, u can try it. if working then u can use it to build ur custom plugin since this plugin is open source.

      CommentAdd your comment...