wenhao001 / rest-assured

Automatically exported from code.google.com/p/rest-assured
0 stars 0 forks source link

How to handle Multiple Base URI with Rest Assured #405

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Have multiple modules within same project which needs to communicate with 
entirely 2 different REST API systems. I want to use Rest Assured for both. The 
problem I am facing here is if I use the code for setting the baseuri 
(RestAssured.baseURI) it will override the previous baseURI. I tried to search 
how people have managed this situation. But didn't find any. Do you have a 
suggestion before I dive in deeper to find a solution. :)

What is the expected output? What do you see instead?
N/A

What version of the product are you using? On what operating system?
Rest Assured 2.4.1.

Regards,
Vikas

Original issue reported on code.google.com by vikas1...@gmail.com on 24 May 2015 at 12:22

GoogleCodeExporter commented 8 years ago
You'll need to use RequestSpecifications (use RequestSpecBuilder). See 
documentation 
https://code.google.com/p/rest-assured/wiki/Usage#Specification_Re-use. Please 
use the mailing list for asking questions in the future though.

Original comment by johan.ha...@gmail.com on 28 May 2015 at 6:33

GoogleCodeExporter commented 8 years ago
Thanks Johan. I wanted to avoid using RequestSpecBuilder as I would need to set 
the url everytime I create a new spec for the same environment. I will also use 
the mailing list next time :)

Original comment by vikas1...@gmail.com on 28 May 2015 at 8:51