googleapis / googleapis/google-http-java-client

HTTP method PATCH not supported

Offen
#1,316 4 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p2 type: feature request
Vorherrschende Sprache
Java
Sterne
1.4k
Forks
473
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

#### Environment details
- OS:Linux
- Java version:1.8
- google-http-java-client version: 1.38.1

#### Steps to reproduce
Hello everyone,

I am trying to make an http patch call with the google-http-client-1.38.1 library, but it is returning an error. I have no problem making HTTP GET, POST, or PUT calls.

I have debugged the library files and I have seen that the error occurs in the httpRequest class when it is going to build the request
`LowLevelHttpRequest lowLevelHttpRequest = transport.buildRequest (requestMethod, urlString)
`
I build the request with the following format
`
val req = httpRequestFactory
.buildRequest(
"PATCH",
GenericUrl(URL),
HTTP_CONTENT)
.setThrowExceptionOnExecuteError(false)
.setLoggingEnabled(true)
.setHeaders(HTTP_HEADERES)
`

#### Stacktrace
java.lang.IllegalArgumentException: HTTP method PATCH not supported

#### External references such as API reference guides used
I am using the google-http-client-1.38.1 through google-auth-library-oauth2-http 0.24.0

Thanks!

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.