I've created very simple endpoint with one HTTP GET method. I'm passing one string as ApiMethod named parameter:
@Api (name = "sample_endpoint")
public class SampleEndpoint
{
public Entity get(@Named("parameter") String parameter)
{
return new Entity(parameter);
}
public class Entity
{
public String parameter = "Validated ok.";
public Entity(String parameter) { this.parameter = parameter; }
public String getParameter() { return parameter; }
}
}
When I call URL with parameter containing letters and numbers and some special chars, like -., it works:
GET http://localhost:8888/_ah/api/sample_endpoint/v1/entity/passedparam
200 OK
{
"parameter": "passedparam"
}
But when I insert certain special characters into parameter, like :#/, I'm getting HTTP 404. Parameter is URL encoded, in example I'm using value passed:param
GET http://localhost:8888/_ah/api/sample_endpoint/v1/entity/passed%3Aparam
404 Not Found
<html><head><title>Error 404</title></head>
<body><h2>Error 404</h2></body>
</html>
Is it bug or feature? Or maybe I'm doing it wrong?
This has been solved as of App Engine SDK 1.8.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With