Ask a Question

ReadyPI Query Parameter - I want to add same parameter twice

SOLVED
bhavesh_patil
New Contributor

ReadyPI Query Parameter - I want to add same parameter twice

I have an endpoint where I need to send 2 values for a single parameter.

Eg.

Signature?product=auto&product=home

 

In postman, i can pass 2 params as "product"  with Auto and Home values. But not in ReadyAPI.

Need help.

bhavesh_patil_0-1644339084392.png

If i give this in single product param  "product=auto&home" its not working.

2 REPLIES 2
richie
Community Hero

Hey @bhavesh_patil,

Ok, so you have multiple repeating query parms with the label 'product', right?

Follow these instructions:

1. Via the API config section , highlight the relevant API, select the 'Request' form to.edit the product query parameter (in the listing) - and in the 'Advanced Options' expandable section of the API config, enable "Disables URL Encoding of the parameter value" checkbox at bottom of the 'Advanced Options' section

2.  Via the Request Properties (bottom left of your screen), find the 'Multi-Value Delimiter'  and input \| in the 'Value' field

3. Via the parameter listing - within the 'Request' form (that lists all the parameters) find the 'product' parm - and within the 'Value' field input the different parameter values separated with a | character, so using the information from your post in the product query parm value field input auto|home

Make sure your MediaType setting is the correct value and you should be good to go!

NOTE: if you want to parameterise your query parm values instead of hardcoding them, you can do the same as always, you just need to remember to include the | separator -->> ${Project #value1}|${Project#value2}

Cheers!

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta

It Worked. Thank you so much for your quick help.

cancel
Showing results for 
Search instead for 
Did you mean: