Slash should be escaped in route values #193
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Route dict is apparently used as a convenience to build URLs for parts between slashes. So it seems appropriate to escape slash (
/
) especially when values contain slashes on purpose.NB: Not using routes with
GhApi(path)
by passing escaped string as path is an acceptable workaround but it does not work when leveragingpaged
method which either does not escape slash when passed as is, or escapes "%2F" when an escaped string is passed:This does not work:
Working around works:
Using paged fails as endpoint does not exist when not escaped:
Using paged fails as package does not exist when escaped