dzieciou / curl-logger

Logs HTTP requests sent by REST-assured as CURL commands.
BSD 3-Clause "New" or "Revised" License
68 stars 23 forks source link

Create support for Apache Http Client #18

Open dzieciou opened 7 years ago

dzieciou commented 7 years ago

In the end we would have three modules

francislainy commented 4 years ago

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.

dzieciou commented 4 years ago

@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.

francislainy commented 4 years ago

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.