Open
Description
While working with the latest eureka server. I'm running the following docker image docker image
The setup is as following
- A single instance of the above mentioned image running.
- I'm using the eureka middle ware for server discovery. Present here https://www.npmjs.com/package/resilient-eureka
The basic code is below
var resilientClient= Resilient({
discovery: {
servers: ['http://localhost:8080/'],
headers: {
Accept: 'application/json'
}
}
});
var servers = [
'http://localhost:8080/'
];
resilientClient.use(eurekaMiddleware({
'path': "eureka/v2/apps",
'serviceName': "MY_REST_API"
}));
resilientClient.discoveryServers(servers);
-
The problem I face is when the response is Gzipped from the eureka server hence can not be parsed directly as xml.
-
I did try different options but none worked for me, As a final solution I had to edit http.js
https://github.com/resilient-http/resilient.js/pull/147/files
this seems to work well.
My two questions are
- Is there any way to achieve this without this code change.
- If not, is http js the right place to put in this hook.
Thanks
Metadata
Metadata
Assignees
Labels
No labels