curl-logger
curl-logger copied to clipboard
Create support for Apache Http Client
In the end we would have three modules
- curl-logger-core: containing
CurlCommand
- curl-logger-apache: containing implementation of
Http2Curl
specification forHttpRequest
- curl-logger-rest-assured: containing implementation of
Http2Curl
specific forRestAssuredSpecification
Hi @dzieciou , I love your library. Thanks so much, it's been a really time saver when debugging issues and I've recommended it to my colleagues too. I've now been looking for Http support and found this issue here and it would be really great if this could be done too please, as I think it would then allows us to use to debug Pact tests that are usually written as per the below.
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactTestTemplate(PactVerificationContext context, HttpRequest request) {
request.addHeader("Authorization", AUTHORIZATION_TOKEN);
context.verifyInteraction();
}
Ps: At the moment, I've been manually doing this as per https://stackoverflow.com/questions/64008576/how-to-turn-pact-interactions-into-curl/64008577
Thanks once again.
@francislainy Thank you for reminding me about this issue.
I once started to work on supporting Apache HTTP Client but the change requires significant refactoring effort and I have less time to maintain this project recently. So I cannot promise implementing this feature will happen soon. Definitely not within next month.
However, I can start collecting test cases like your to drive this effort.
Sure, understand that and appreciate the time put into offering this great and free library back to the community. Whenever you can please and that should be good enough. Thank you very much.