vendredi 5 février 2016

Intercept outgoing HTTP requests

so I'm looking for a library or some way of intercepting any outgoing HTTP requests from my Java application? Why? Because I want to unit test an API integration and since I'm using a library (wrapper) for that API, I can't modify any of it's code. It's not my code that's actually making the HTTP requests.

So, I need to intercept them, view them and assert they are correct according to the API's documentation.

I've tried looking online, but I couldn't find the exact thing I'm looking for. Most libraries out there will let me do it, only if I configure the requests themselves properly, but I can't do that, since they're made by an API wrapper, not my code.

Cheers

Aucun commentaire:

Enregistrer un commentaire