How to indicate end of path variable in postman

Viewed 376

I am trying to test some requests with Postman to the Open Library Covers API and I cannot find a proper way to send my params.

According to the docs, the request should be something like this:

http://covers.openlibrary.org/b/$key/$value-$size.jpg

I am configuring my GET request as follows:

http://covers.openlibrary.org/b/:key/:value-:size.jpg

I can properly fill the key path variable but unfortunately :value-:size.jpg is recognized as one unique variable. How can I split it so that those are two variables :value and :size?

Thanks in advance.

1 Answers

I have not yet found a solution but a possible alternative.

If I configure the request as:

http://covers.openlibrary.org/b/{{key}}/{{value}}-{{size}}.jpg

I can then use the Pre-req to define the following assignments:

pm.variables.set('key', 'isbn');
pm.variables.set('value', '0385472579');
pm.variables.set('size', 'S');

This is not exactly what I was looking for, but it works.

Related