212
Views
7
Comments
Solved
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 

2021-07-21 10-26-16
Vani Mankad
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


2021-05-24 04-11-07
Marvin

Thanks I Will Tried

2021-05-24 04-11-07
Marvin

Hi Vani, this solved my problem thanks

2021-07-21 10-26-16
Vani Mankad
2021-05-18 02-27-17
Manish Gupta
Champion

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. 



2021-05-24 04-11-07
Marvin

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


2021-05-18 02-27-17
Manish Gupta
Champion

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 - 


2021-07-21 10-26-16
Vani Mankad
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


2021-05-24 04-11-07
Marvin

Thanks I Will Tried

2021-05-24 04-11-07
Marvin

Hi Vani, this solved my problem thanks

2021-07-21 10-26-16
Vani Mankad
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.