Robotic Process Automation (RPA)

 View Only
  • 1.  HTTP Request POST JSON question

    Posted Mon November 22, 2021 09:37 PM
      |   view attached
    Hi,

    I got request to POST numeric field using HTTP request to my JSON endpoint but seem I cannot see the numeric variable or even the boolean field however if Text base then OK. If this the current HTTP Request function only work for Text at the moment.

    So the only way is I need to covert all these numeric & boolean to another text based variable first and post it?

    Thanks.

    ------------------------------
    Sonny Siah
    Infra365 Sdn Bhd
    ------------------------------


  • 2.  RE: HTTP Request POST JSON question

    Posted Wed November 24, 2021 02:58 PM
    I don't see any errors in the image other than the missing definition of the variable named "success".

    ------------------------------
    Joba Diniz
    Product Manager
    IBM
    ------------------------------



  • 3.  RE: HTTP Request POST JSON question

    Posted Wed November 24, 2021 09:49 PM
    Hi,
    Sorry, maybe my explanation not so clear, like this I got two variables (one is Text base "Address" and another one is numeric variable called "Quantity") so if I create a HTTP Request command with method set to POST and I use JSON as formatter. At the Body section I start enter JSON syntax {"Address":" and then I click the variable selection icon for text I can see the variable list out but when come to numeric I can't it, not sure if the currently not support or interface bug?.

    My understand JSON post syntax for Text:
    {"Address":"address"}

    Numeric syntax:
    {"Quantity":100}

    Thanks.





    ------------------------------
    Sonny Siah
    Infra365 Sdn Bhd
    ------------------------------



  • 4.  RE: HTTP Request POST JSON question

    Posted Thu November 25, 2021 06:35 AM
    This seems a defect, can you raise a support case?

    What if you manually write the variable name and click "Save" button, will it save or show error?

    ------------------------------
    Joba Diniz
    Product Manager
    IBM
    ------------------------------



  • 5.  RE: HTTP Request POST JSON question

    Posted Thu November 25, 2021 09:52 AM

    Construct the body using the setVar command:

    setVar --name "${body}" --value "{\"test\":${NumericVar}}"

     

    But to treat it as a bug please raise a support case.



    ------------------------------
    Jadiel Alves Barbosa
    ------------------------------