Skip to content
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

Slashes problem #6

Open
Taruga opened this issue Oct 29, 2015 · 4 comments
Open

Slashes problem #6

Taruga opened this issue Oct 29, 2015 · 4 comments

Comments

@Taruga
Copy link

Taruga commented Oct 29, 2015

How can I search for a string with slashes like "AC/DC" ?

GET http://api.example.com/bands/AC/DC

I've tried like:
GET http://api.example.com/bands/AC\/DC
and
GET http://api.example.com/bands/%AC/DC%

But I can't get it to work , any help ?

@mozboz
Copy link

mozboz commented Oct 29, 2015

if you want to put strings with strange characters in URLs, you usually need to URL encode them. try URL encoding AC/DC here and you'll see it's AC%2FDC . so your search string should probably be:

..../bands/AC%2FDC

@mozboz
Copy link

mozboz commented Oct 29, 2015

oops, meant to say try URL encoding here: http://meyerweb.com/eric/tools/dencoder/

@Taruga
Copy link
Author

Taruga commented Oct 29, 2015

Forgot to tell you, Tried that as well, but I don't get any output. It doesn't find it.
I have no problems with other characters like the plus sign, for ex. "abc+def". Calling the api with the encoded string I get the result, but fields that contain slashes It doesn't work
{
"error": {
"code": 404,
"status": "Not Found"
}
}

@mozboz
Copy link

mozboz commented Oct 29, 2015

That sounds like a bug then - maybe when Rester is processing parameters that come from URL's it needs some special escaping or is accidentally filtering too hard. Guess someone will need to dive into the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants