Şub 19 2013
Sap Abap Bsp HTTP Get & Post Request Metod
DATA: http_client TYPE REF TO if_http_client ,
http_url TYPE string ,
p_content TYPE string .
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = ‘http://scn.sap.com/welcome’
* proxy_host =
* proxy_service =
* ssl_id =
* sap_username =
* sap_client =
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
http_client->request->set_header_field( name = ‘~request_method’
value = ‘GET’ ).
* Send the request
http_client->send( ).
* Reterive the result
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
p_content = http_client->response->get_cdata( ).
” Tag Replacemnt
REPLACE ALL OCCURRENCES OF ‘<’ IN p_content WITH ‘<‘ .
REPLACE ALL OCCURRENCES OF ‘>’ IN p_content WITH ‘>’ .
write p_content .
tekin
30 Temmuz 2016 @ 08:53
Merhaba ,
CALL METHOD http_client->receive metodunda exception sürekli 1 e düşüyor , nedeni nedir bulamadım ? bir bilginiz var mı acaba ?
Burhan KARADERE
9 Ağustos 2016 @ 09:15
kodunuzu gönderebilir misiniz ?