-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bugfix] Fix encoding #95
Conversation
I suppose this fixes #94 ? :) |
Hey, I'll inform You when the issue is resolved 🚀🚀 |
packages/sdk/src/helpers.ts
Outdated
@@ -50,7 +50,7 @@ export function assert(condition: any, message?: string): asserts condition { | |||
throw new Error(message) | |||
} | |||
|
|||
export function toQueryParams(obj: Record<string, unknown>): Record<string, string> { | |||
export function toQueryParams(obj: Record<string, unknown> | any): Record<string, string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change really necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please remember to release both SDK and React-widget
@alex-all3dp Yes, this is meant to fix encoding query params in Client Side SDK. |
Version 1.3.0 enabled encoding in
RequestController
- it was used to fix encoding for both server side and client side SDKs. This introduced issue, as we did not notice that ClientSide get methods were explicitly encoding query params (toQueryParams
function). That meant the query params were encoded twice and that lead to issues with characters such as %.