Last active
March 3, 2021 16:51
-
-
Save quxiaowei/d8beb6c96fe3400d2a32e04f7f59e1b0 to your computer and use it in GitHub Desktop.
[IF_REST_APPLICATION~GET_ROOT_HANDLER] #ABAP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
METHOD if_rest_application~get_root_handler. | |
*CALL METHOD SUPER->IF_REST_APPLICATION~GET_ROOT_HANDLER | |
* RECEIVING | |
* RO_ROOT_HANDLER = | |
* . | |
DATA: lo_router TYPE REF TO cl_rest_router. | |
IF mo_server IS BOUND. | |
CREATE OBJECT lo_router. | |
lo_router->attach( iv_template = '/GetTest' iv_handler_class = 'ZCL_REST_WS_TEST' ). | |
lo_router->attach( iv_template = '/GetTest/{name}' iv_handler_class = 'ZCL_REST_WS_TEST' ). | |
lo_router->attach( iv_template = '/GetTest/{name}/' iv_handler_class = 'ZCL_REST_WS_TEST' ). | |
ro_root_handler = lo_router. | |
ENDIF. | |
ENDMETHOD. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment