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

PATCH method call POST #137

Open
martinmilacek opened this issue Jan 16, 2017 · 1 comment
Open

PATCH method call POST #137

martinmilacek opened this issue Jan 16, 2017 · 1 comment

Comments

@martinmilacek
Copy link

I have called PATCH method, but wslite executed POST method. Is it bug or feature? Thanks.

Response patch(Map params=[:], Closure content=null) {
Map newParams = new LinkedHashMap(params ?: [:])
if (newParams.headers) {
newParams.headers[HTTP.X_HTTP_METHOD_OVERRIDE_HEADER] = HTTPMethod.PATCH.toString()
} else {
Map override = [:]
override[HTTP.X_HTTP_METHOD_OVERRIDE_HEADER] = HTTPMethod.PATCH.toString()
newParams['headers'] = override
}
return executeMethod(HTTPMethod.POST, newParams, content)
}

@ghost
Copy link

ghost commented Sep 5, 2018

Seeing the same issue. Any word on a fix for this? Thanks!

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

1 participant