- edited description
Adding Authorization header to every request
Issue #50
closed
We have this authorization token in the pact build gradle file. which is used for pactVerify step in provider pact using the pact library.
pact {
serviceProviders {
testprovider {
protocol ='http'
host = 'api'
port = 80
requestFilter = { req ->
// Add an authorization header to each request
req.addHeader('Authorization', AUTH_TOKEN)
}
hasPactWith("testconsumer") {
pactFile = file("../pacts/testconsumer-testprovider.json")
}
}
}
}
So we need similar requestFilter so that every request during the verification uses an AUTH_TOKEN
Is that already possible? could you please point me to an example where that can be done.
Comments (2)
-
reporter -
reporter - changed status to closed
seems like its not needed as eventually saw after using the library, so closing the issue.
- Log in to comment