-
Notifications
You must be signed in to change notification settings - Fork 176
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
Update uri with encoded path if it was part of the original request #45
Conversation
I'm a little confused – you're passing in a
I think probably the best way to handle it would be by recognising it officially – this seems a little... post hoc maybe? 😸 |
Yeah, so I'm using request-promise, which requires a
This works fine when the So my purpose with this pr was not to add full support for Would you like me to include full support of |
@Andras-Marozsi is there a reason you don't use the |
The only reason is that I prefer promises over callbacks, and as I use them in the framework all over, wanted to be consequent and went for the promise based solution. |
@Andras-Marozsi I think you're misunderstanding my question. Doesn't |
Ah, I see what you mean. If I don't add in the
But if I don't add |
@Andras-Marozsi You don't need to pass in |
Hm, I can't make it work, I'm getting 403 with that solution. |
No problems – feel free to show me your code and I can see if there's anything that jumps out |
I've run into some issues when the path contained some special characters, like colons:
:
.In this case, the
path
attribute of the request object was updated to the encoded one, but theuri
was not, so the keys generated on the server/client side didn't match, and I got an authentication error.Though it can be solved by using an encoded
uri
, it would be nice if the updates done to the request are in sync with each other and you don't have to worry about which part will be changed and which won't. This update will be only applied if theuri
is provided, otherwise it won't change anything.I'm already using the head of my fork but thought others would also benefit from this change.