Hit different api in same scenario with different base urls

I have 2 apis that i would like to hit in synchronous manner (one after the other)

exec(post request to business service - localhost:8080)
.exec(get request to validation service - localhost:8081)

is this possible?

Yes, why not?
You’ll have to put the whole url in (at least) one of them, but I don’t see any reason you can’t.

Ahh ok thanks. For some reason I thought they all needed to be relative paths. I will give it a shot thanks !

    HttpProtocolBuilder httpProtocol = http
            .baseUrl("http://localhost:8080")
            .authorizationHeader("Bearer xxxx")
            .contentTypeHeader("application/json");

i don’t need these items on the 2nd api call. Trying to figure out how to only send on the first url call

I advise against using it in the “protocol” if you need to have different value (or presence/absence) in your requests.

Set them only for your first request (as you don’t need for your 2nd request) during your 1st request construction.

Thanks again - yes will use headers to set for each request.