Skip to content

Commit b50a7ee

Browse files
authored
cleanup handler
1 parent 19ee93f commit b50a7ee

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

test/zcl_sicf.clas.abap

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,15 @@ CLASS zcl_sicf IMPLEMENTATION.
1111
METHOD if_http_extension~handle_request.
1212

1313
DATA lv_requ_body TYPE string.
14-
DATA lv_method TYPE string.
15-
16-
lv_requ_body = server->request->get_cdata( ).
17-
lv_method = server->request->get_method( ).
14+
lv_req = server->request->get_cdata( ).
1815

1916
DATA lv_resp TYPE string.
20-
CASE lv_method.
21-
WHEN 'GET'.
22-
lv_resp = z2ui5_cl_http_handler=>http_get( ).
23-
WHEN 'POST'.
24-
lv_resp = z2ui5_cl_http_handler=>http_post( lv_requ_body ).
25-
ENDCASE.
17+
lv_resp = z2ui5_cl_http_handler=>main( lv_req ).
2618

2719
server->response->set_cdata( lv_resp ).
20+
server->response->set_header_field( name = `cache-control` value = `no-cache` ).
2821
server->response->set_status( code = 200 reason = `success` ).
2922

3023
ENDMETHOD.
3124

32-
ENDCLASS.
25+
ENDCLASS.

0 commit comments

Comments
 (0)