-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karate as Proxy Server? #640
Comments
yes, look at the last row in this table: https://github.com/intuit/karate/tree/master/karate-netty#consumer-provider-example the limitation currently is that it does not support HTTPS. typically not an issue since you have control over your environment (and config / property files). so to enable and disable, just set a system HTTP proxy that points to your karate instance |
That worked, thank you! When you say it does not support HTTPS, what exactly do you mean? I tried to proxy to an https endpoint and was unsuccessful. I did set ssl to true in the feature file but the request was forwarded on HTTP, not HTTPS. |
@nycjoker that you can't "unpack" HTTPS in the feature file. you should be able to forward to HTTPS - keep in mind that it is not just the |
@ptrthomas I'm trying to have Karate Proxy Server act as a pass-through for HTTPS URLs that are not mocked. However, when I use Example
|
@nycjoker yes, we haven't implemented handling of |
@ptrthomas thanks for the quick reply. Is support planned on the roadmap? |
@nycjoker we really want to do this, just that is a little complex ! take a look at https://github.com/adamfisk/LittleProxy |
@ptrthomas LittleProxy looks great. Would be awesome for Karate to have this ability. |
@ptrthomas Been working with mock server as an HTTP PROXY a bit more. I've encountered several HTTPS endpoints at my company that need to be mocked. Unfortunately, HTTP endpoints are unavailable. What is your recommendation in mocking these HTTPS endpoints? Setup LittleProxy to handle HTTPS endpoints by intercepting them and then forward on to Karate mock server via HTTP? |
yes LittleProxy. but I would first explore if I can re-wire the "callers" to use HTTP, and then Karate can intercept and forward on to HTTPS. typically in pre-prod environments, you would have this level of control |
@ptrthomas thanks for the feedback. |
@nycjoker I've had some success implementing an HTTPS proxy. are you interested in joining the slack channel and discuss more / do some early testing - please send an e-mail to ptrthomas at gmail dot com |
Hi, As suggested, i have been trying to intercept the 3rd party APIs being consumed in my spring boot application, using karate as a proxy server, and return mock responses, but it is still executing the actual API and not the mock. Thanks |
@prernad0903 this is of no use. see if this answer helps: https://stackoverflow.com/a/61414022/143475 else follow this process: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue |
@ptrthomas Thank you! This helps.. |
an update HTTPS is not yet possible because we need a change in the underlying Armeria server we use. details here: https://stackoverflow.com/q/64755992/143475 |
I have an application that consumes 3rd party services? Is it possible to utilize Karate as a true HTTP proxy server such that request to a 3rd party service are intercepted and my mocks are returned in the response? I would like a seamless way to enable and disable mocking.
The text was updated successfully, but these errors were encountered: