You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 1, 2026. It is now read-only.
Thanks for your great service, but I've come across an issue:
Normally when you set query parameters in an url you use something like encodeURIComponent(), especially when you have another url as the value which can contain special characters like ?, = and &. However with your service when you do this:
var url = 'https://api.codetabs.com/v1/proxy/?quest=' + encodeURIComponent('http://example.com');
Requesting that url gives this response:
{
"Error": "http://http%3A%2F%2Fexample.com is not a valid resource"
}
So apparently the server doesn't actually treat it as a query string. Either it has to decode the query string, or you could allow urls like 'https://api.codetabs.com/v1/proxy/http://example.com' (in which case you would use encodeURI() instead of encodeURIComponent()).
Hi,
Thanks for your great service, but I've come across an issue:
Normally when you set query parameters in an url you use something like encodeURIComponent(), especially when you have another url as the value which can contain special characters like ?, = and &. However with your service when you do this:
var url = 'https://api.codetabs.com/v1/proxy/?quest=' + encodeURIComponent('http://example.com');Requesting that url gives this response:
So apparently the server doesn't actually treat it as a query string. Either it has to decode the query string, or you could allow urls like 'https://api.codetabs.com/v1/proxy/http://example.com' (in which case you would use
encodeURI()instead ofencodeURIComponent()).