Hi,
I’m trying to update a record on my site using an API and it requires me to use an http PUT method to do so. I tried doing it using the http connector component in clover but it doesn’t seem to support the method. Is there a way to make an http PUT request using the http component or in clover?
Thanks.
Hi pOctavian,
I am not sure whether I did’t answer your question on support few days ago. If yes, just ignore this
You’ve right, PUT is not supported. There is feature request https://bug.javlin.eu/browse/CL-2223
If you have control over your server, you can use POST instead and add extra
parameter like “_method=PUT”. Then in routing layer of the server (e.g. Rack
middleware for Ruby) you can change HTTP method based on delivered parameter.
If you don’t have control over server, you can use SystemExec component and
comamnd line tool like cUrl (see http://curl.haxx.se/docs/httpscripting.html). So
first, persist your request data into file, then build command line, execute and
then check result.