Answer the question
In order to leave comments, you need to log in
How to make a PATCH request in Java?
Hello. I work with an API that, in order to update a record, waits for a PATCH request: it swears on POST. I found this on stackoverflow:
urlObject = new URL(url + urlParameters);
urlConnection = (HttpURLConnection) urlObject.openConnection();
urlConnection.setRequestProperty("accept-charset", "UTF-8");
urlConnection.setRequestMethod("POST");
urlConnection.setRequestProperty("X-HTTP-Method-Override", "PATCH"); // взято со стековерфлоу
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question