Hi
I am trying to do local proxy chaining using httpClient in Javascript.
where I am using url which looks like http://localhost:8998/targetproxybasepath to call another local proxy. Call is failing as I believe localhost is not supported with httpClient?
Is there any way to do local proxy chaining using httpClient.send or httpClient.get?
Thanks & Regards
Jayesh
I dunno. Maybe try 127.0.0.1 ?
Hi @Dino-at-Google
Thank you for your suggestion. I tried with 127.0.0.1 but unfortunately It didn’t work. I found the work around. Since we are using Private cloud version, I am calling message processor server directly on 8998 port so url is http://apigeemsgprocessserer:8998/targetproxybasepath with additional header called X-Apigee.Host where I pass the value of my virtualhost and that seems to work fine.
1 Like
Excellent! Glad you found the solution.
Out of curiosity, Is there a particular reason you’re trying to do this with javascript rather than just using a service callout?
@dane knezic I am trying to call target proxy multiple times for each element of array from original incoming request. That’s why Service call out option was ruled out.
local chaining hits directly to the message processor with port 8998 and the host as localhost. You can configure the same to your javascript.
I am also having the same problem but in my case I am using public cloud. I tried using https://localhost:8998/basepath and https://127.0.0.1/basepath but these doesn’t work and show error host not reachable.
Can you share your piece of javascript code because I tried the same and it seems to not work.