type QuizAnswers struct {
QuizID string `json:"quiz_id"`
Answers []int `json:"answers"`
}
func (gs *RQService) SubmitAnswers(c context.Context, r *QuizAnswers) (*QuizResult, error)
works fine with rest-based clients (javascript, Android) but fails to fill out the parameter r on calls to dev_appserver from iOS clients (using the rpc protocol).
Notice that the arguments only appear under the "resource" key on dev_appserver, while the arguments appear directly in the "request body" in production. As far as I can see from the go-endpoints source, the arguments are marshaled from the body directly, ignoring "resource".
I'm sorry for not providing an end-to-end example, but app engine endpoints are difficult to set up, especially with iOS clients. If there is anything else you need, don't hesitate to ask. Also notify if the bug belongs to dev_appserver, in which case I'll forward this report to the appengine issue tracker.
FWIW, this is the equivalent curl invocation for the API call, fetched with wireshark:
This service method:
works fine with rest-based clients (javascript, Android) but fails to fill out the parameter
r
on calls to dev_appserver from iOS clients (using the rpc protocol).I'm calling the API like this:
It works fine on the production server.
One hint is a debug line from the go-endpoints library. This is the line from dev_appserver:
while this is the output from production:
Notice that the arguments only appear under the "resource" key on dev_appserver, while the arguments appear directly in the "request body" in production. As far as I can see from the go-endpoints source, the arguments are marshaled from the body directly, ignoring "resource".
I'm sorry for not providing an end-to-end example, but app engine endpoints are difficult to set up, especially with iOS clients. If there is anything else you need, don't hesitate to ask. Also notify if the bug belongs to dev_appserver, in which case I'll forward this report to the appengine issue tracker.
FWIW, this is the equivalent curl invocation for the API call, fetched with wireshark:
I confirmed that replacing http://localhost with https://.appspot.com results in a properly unmarshaled parameter
r
.