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

GIT With body #1907

Closed
mmcminn opened this issue Jul 9, 2016 · 1 comment
Closed

GIT With body #1907

mmcminn opened this issue Jul 9, 2016 · 1 comment

Comments

@mmcminn
Copy link

mmcminn commented Jul 9, 2016

So this is related to the DELETE with body issue. I am not sure why every API developer for android assumes GIT can't have a body. As far as I know the RFC allows ALL verbs to have a body during the request. Only the HEAD response explicitly does not have a body.

What will it take to remove this restriction because I'd really rather not fork.

Within ServiceMethod.java
all calls to parseHttpMethodAndPath should be true for hasBody.

In fact the whole hasBody thing should just be removed. There is absolutely no need for it.

@JakeWharton
Copy link
Collaborator

99.9% of the time a GET with a body is a programmer error, not desired intent, so for that reason we optimize for that case. You can use @HttpMethod(value = "GET", hasBody = true) instead, although I wouldn't be surprised if OkHttp ends up throwing an exception in this case as well.

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

No branches or pull requests

2 participants