-
Notifications
You must be signed in to change notification settings - Fork 48
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
POST method fails when using with new Unleash Edge service #228
Comments
Hi @mhuffsti , sorry for the delayed response. I've made Unleash/unleash-edge#510 which should fix it, and will be released as soon as @sighphyre and myself can agree on the way forward. |
Way forward agreed. We'll release 19.3.1 sometime today and I'll update this again when you can upgrade your Edge. |
Hi @mhuffsti , could you please try to use 19.3.1. It worked for us, but not closing this ticket until I have confirmation from you that it works from your end. |
It should be expecting a string, at least that's what our schema says, but I guess proxy has just been tolerating this since it's javascript. But with actual typed languages, this breaks. I'll make a PR on this repo |
Ok, bugfix commited, will release a 3.6.1 of the client. |
3.6.1 released which will post sessionId as a string also if auto generated. Thanks for letting us know. Closing this issue now. |
I'm not sure if the issue is on the Edge side or within this unleash-proxy-client or maybe I should be using a completely different frontend JS client when switching from Proxy to Edge, but I'll start with this issue here.
I have the unleash-proxy-client setup and working fine and it is making its requests against an Unleash Edge server. Everything seems to be working fine. However, we wanted to switch from using GET to POST. When we set usePOSTrequests to true, this part of the code:
unleash-proxy-client-js/src/index.ts
Line 563 in 81903aa
builds a POST payload that takes the form of (eg, a generalized example for illustration purposes):
{"context":{"sessionId":#######,"appName":"APP_NAME_HERE","environment":"ENV_NAME_HERE"}}
However, when that request hits the Edge server, it responds with:
Json deserialize error: invalid type: map, expected a string at line 1 column ##
I did some testing, and if we remove the "context" piece and only send as the payload the contents of context, then the Edge server responds appropriately.
Question:
The text was updated successfully, but these errors were encountered: