Forum Discussion

MikeSchoolik's avatar
MikeSchoolik
Occasional Contributor
9 years ago

Ready API: Rest call with same Parameters

How do I go about adding multiple parameters with the same name. In the application, you can not add a parameter with the same name.

 

For example 

 

endpont: http://api.pleasework.com

resource: /ids

parameters: id,id

so the call would look like http://api.pleasework.com/ids?id=1&id=2

 

any ideas?

 

 

 

 

  • MikeSchoolik's avatar
    MikeSchoolik
    9 years ago

    I figured it out

    on the request property: add a multi-value delimiter \|

    also select Disables URL-Encoding of the parameter value

    then

    make 2 parameters 

    id 

     

     

    on the request test steps fill them in according for various permutations :

    id&id=&id=

    or

    1&id=2&id=3

    and so on

    • MikeSchoolik's avatar
      MikeSchoolik
      Occasional Contributor

      For this call, 2 ids are provided and the expected response will be a shape containing information for both ids.

       

      Ready API does not allow you to add two parameters with the same name. See picture.

       

      How do you work around thing. This was identified as a defect years ago.

       

       

  • bilgvvn's avatar
    bilgvvn
    Occasional Contributor

    I think issue is still there. But if you really need, i suggest you to try below.

     

    Name: id=1&id

    Value =2

     

      • MikeSchoolik's avatar
        MikeSchoolik
        Occasional Contributor

        I figured it out

        on the request property: add a multi-value delimiter \|

        also select Disables URL-Encoding of the parameter value

        then

        make 2 parameters 

        id 

         

         

        on the request test steps fill them in according for various permutations :

        id&id=&id=

        or

        1&id=2&id=3

        and so on