Forum Discussion
Thanks for clarifying this JoostDG .. and again to you richie for the bigger picture I needed that ..definitely more reading for me.
Cool so change back on the API at self before I add to test case nice.
Right so this is an odd request someone has put together ..the 'Id' of the shopping cart is in the Resource section i.e. 1441 below .. there is no query parameter:
The valid request when sent looks like this:
GET https://host/api/cart/1441?clientId=uavittrade
So it makes sense to add one so I can pass it on (or call it from an earlier request).
If I add the parameter like this:
I see this:
If I set a value in the cartid field and send the request I get a 'No such host is known error as I have compromised the url. You can see no cart id now is being passed:
GET https://host/api/cart?clientId=uavittrade
If I change the parameter from template to QUERY I see the cartid now in the Paramaters section at top right ..but this produces an invalid query
https://host/api/cart?clientId=uavittrade&cartid=1441
I somehow need to target the Resource .. is that possible?
- JoostDG3 years agoFrequent Contributor
Hi thatsthat
You can add cartid in the resource url directly in the api definitions, like this "/api/cart/{cartid}". I would prefer cartId to be honest, that's more in accordance with naming standards, but I guess cartid would work as well...
Type should be template.
Note that this will probably impact any test cases you already have (the values for cartid will get blanked out).
Related Content
- 9 months ago
Recent Discussions
- 5 days ago
- 9 days ago