Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

How to make an HTTP "PUT or DELETE" request from ABAP?

$
0
0

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


Viewing all articles
Browse latest Browse all 8332

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>