Hi,
I was able to make connection with a RESTful web service from ABAP with the following code:
CALL METHOD CL_HTTP_CLIENT=>CREATE_BY_DESTINATION
EXPORTING
DESTINATION = 'CONSTELLATION'
IMPORTING
CLIENT = httpClient.
CALL METHOD HTTPCLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = '~request_method'
VALUE = 'POST'. "IT DOESN'T SEEM TO WORK WITH 'DELETE' OR 'PUT' HERE
CALL METHOD HTTPCLIENT->REQUEST->SET_HEADER_FIELD
EXPORTING
NAME = 'Content-Type'
VALUE = 'application/xml'.
... ...
However, the problem is, this seems to only work with POST and GET, but not PUT or DELETE.
Has anyone been able to successfully make either a PUT or a DELETE HTTP request. Note that I've tried both HTTP 1.0 and 1.1, but it doesn't seem to make any difference.
I'd really appreciate any help out there!
Thanks,
Wei-wei