DATA : lv_method TYPE string.
lv_method = server->request->get_header_field( '~request_method' ).
DATA(lv_methond2) = server->request->get_method( ).
DATA:lv_content_type TYPE string.
DATA:lv_json_request TYPE string,
lv_json_response TYPE string.
*XXXX 业务代码
lv_json_response = '{"name":"hello world !111"}'.
* DO 1 TIMES.
* WAIT UP TO 1 SECONDS.
* ENDDO.
server->response->set_cdata( EXPORTING data = lv_json_response ).
" Sets current HTTP status code
server->response->set_status( code = 200 reason = 'OK' ).
lv_content_type = 'application/json'.
" Set the Body Type (Text/HTML, for example)
server->response->set_content_type( lv_content_type ).