Closed yashha closed 8 years ago
Hello @yashha , if you want to query a character which has some symbols like ( ) or { } or [ ]
in his/her name simply use backslash \
before every symbol. This tells the regular expression to also take these symbols into account. See my example below:
Your previous GET request which breaks:
https://got-api.bruck.me/api/characters/Will%20(squire)
Solution which works:
https://got-api.bruck.me/api/characters/Will%20\(squire\)
Notice the backslash symbols \
For me https://got-api.bruck.me/api/characters/Will%20\(squire\)
redirects to apidocs?
@sacdallago ye, escaping in URLs does not work. The real fix is #100
@sacdallago @kordianbruck @yashha My fix works perfectly with Safari but it doesn't work with Chrome/Firefox. Sorry! In Chrome/FF, it automatically converts backslashes to normal slashes.
To suppress this behavior, go one step further and simply replace \
with %5C
Example: https://got-api.bruck.me/api/characters/Will%20%5C(squire%5C)
:D simply put, URL encode the search term @yashha
thanks! :)
https://got-api.bruck.me/api/characters/Will%20(squire) Doesn't work, how can I fix it?