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

x-http-method-override is not honored #78

Open
ircecho opened this issue Dec 16, 2015 · 0 comments
Open

x-http-method-override is not honored #78

ircecho opened this issue Dec 16, 2015 · 0 comments

Comments

@ircecho
Copy link

ircecho commented Dec 16, 2015

If have an API method that is annotated as follows

 @ApiMethod(
      path: 'android/orders/{orderId}',
      method: 'PATCH')

and executed with this request:

POST /api/ma_api/v2/android/orders/519?alt=json HTTP/1.1
Accept-Encoding: gzip
Authorization: ...
User-Agent: Google-API-Java-Client Google-HTTP-Java-Client/1.21.0 (gzip)
x-http-method-override: PATCH
Content-Type: application/json; charset=UTF-8
Host: 10.0.0.17:8180
Connection: Keep-Alive
Content-Length: 43

{"reason":"test reason","status":"Refused"}

I get a
2015-12-16 16:12:10.018 0:00:00.202175 POST [404] /api/ma_api/v2/android/orders/519?alt=json
404 error, where the method should be called correctly.

Changing the annotation to

 @ApiMethod(
      path: 'android/orders/{orderId}',
      method: 'POST')

rectifies the situation, so there are no path issues.

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

No branches or pull requests

1 participant