WebService Connector - HttpURLConnection PATCH Method issue

Hi Team,

For one of the web service application,we need to call an endpoint multiple times.
here, in one of the rule we are iterating and calling the endpoint multiple times by using ‘HttpURLConnection’ and the method using is PATCH.

while executing the specific operation it is throwing the below mentioned error.can anyone provide alternate approach other than ‘HttpURLConnection’ for establishing the connection/ any approch to accept the ‘PATCH’ method and calling the endpoint multiple times.
Error:
The application script threw an exception: java.net.ProtocolException: Invalid HTTP method: PATCH

Thanks,
Akash

Hi

Are you sure that you target application supports PATCH method?
Are you using ootb connector to call that application or custom java code?
Can you access the same endpoint using Postman? (to confirm correctness)

Regards
Alek

Hi @AkashRaavi131

I’m not sure about that BTW but just a hint may lead to a resolution

“HttpURLConnection does not natively support the PATCH method. This is a known limitation of the Java standard library.”
Workaround: Use X-HTTP-Method-Override Header
X-HTTP-Method-Override: PATCH

Since this workaround is not ideal, using Apache HttpClient is strongly recommended for making PATCH requests properly

Regards,
Muhammad