-
-
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
Create an option to use karate.proceed functionality in JS mocks #2344
Comments
We (@anupamck and I) have already looked into this a bit and found a way to do a forwarding for http requests. However it is proving difficult to do the same for https. To send a new request inside ServerContext.java we are creating a HttpClient using This gives us an ArmeriaHttpClient that produces an error when sending a request to an https URL. Is there an intended way to use the ArmeriaHttpClient for ssl requests? Looking through the Armeria documentation has so far not proven successful. |
@vincent-hennig please take a look at #2048 and let me also tag @ismail-s here for his thoughts |
@vincent-hennig meanwhile perhaps using the ApacheHttpClient instead of Armeria should work |
@ptrthomas The Https issue turned out to be due to me not setting up headers correctly. It is working now. Unfortunatley we ran into a different problem with the ArmeriaHttpClient: When using context.http or our newly created context.proceed the ArmeriaHttpClient just stops responding after a few dozen requests have been sent. Every request then gets a timeout after 30 seconds. While investigating this we saw that it looks like every call to context.http() creates at least one additional thread that simply never shuts down again. Could there be some Problem with cleaning up open connections/threads inside the ArmeriaHttpClient? |
@vincent-hennig yes quite likely, it may need investigating |
As stated in this question on stackoverflow we would like to use request forwarding while using a javascript mock. Currently this feature does not exist for JS mocks and could be implemented as context.proceed(), saving users the work of manually creating a new http request and handling responses.
The text was updated successfully, but these errors were encountered: