How To Send Request Data From Input Value Using Rest API(Consume)?
Question

How To Send Request if i want to send request using my value from input like using Base64 File i want use it to send to Google OCR 


How to Change That With My Own Value From Input to make request and then get the response text 

Solution

HI,

You will have to create variable of type of that "request structure" and then assign the value.

As shown in pic, Once you will consume the API, it will auto create request and response structures which is needed to pass on to API.

for ex as per below pic -

Create variable of type "PostImagesRequest" structure and then assign the value.You can right click on request variable and can see the structure type as well.

Please let me know if that helps.

Thanks,

Vani


Thanks I Will Tried

Hi Vani, this solved my problem thanks

Hello Marvin

Please Use Assign For this. Please follow as below - 

1. Create one Input Field on Screen (From where you want to take input)

2. Add Button on same screen to trigger the API

3. On the Action of that Button use ASSIGN, and assign Input Variable to the API Vriable

4. Same Way, Create Local Parameter on Screen and Assign OutPut Value to that Local Parameter to print. 



Sorry I forget to show, i already use assign that giving error need data type instead of text etc because i send it in json mode


Okay, even you can try to saving this as TEXT. Instead of adding the direct structure please choose the one Attribute but the Attribute Datatype should be Text. Like - 


Solution

HI,

You will have to create variable of type of that "request structure" and then assign the value.

As shown in pic, Once you will consume the API, it will auto create request and response structures which is needed to pass on to API.

for ex as per below pic -

Create variable of type "PostImagesRequest" structure and then assign the value.You can right click on request variable and can see the structure type as well.

Please let me know if that helps.

Thanks,

Vani


Thanks I Will Tried

Hi Vani, this solved my problem thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.