escape_urlEXPORTINGunescaped=contentRECEIVINGe" />
【ABAP】SAP调用Restful传输地址中文解决方法 | 您所在的位置:网站首页 › restful的接口方法 › 【ABAP】SAP调用Restful传输地址中文解决方法 |
restful传输不需要建企业服务客户端代理,直接代码传输即可,中文需要转码 " 中文转ASCII CALL METHOD cl_http_utility=>escape_url EXPORTING unescaped = content RECEIVING escaped = content. 123456其余步骤如下 "创建http客户端 CALL METHOD cl_http_client=>create_by_url EXPORTING url = url IMPORTING client = http_client EXCEPTIONS argument_not_found = 1 plugin_not_active = 2 internal_error = 3 OTHERS = 4."设置http method 为Get http_client->request->set_method( if_http_request=>co_request_method_get ). "发送 CALL METHOD http_client->send EXCEPTIONS http_communication_failure = 1 http_invalid_state = 2 http_processing_failed = 3 http_invalid_timeout = 4 OTHERS = 5. "接收 CALL METHOD http_client->receive EXCEPTIONS http_communication_failure = 1 http_invalid_state = 2 http_processing_failed = 3. "获取接口返回的数据 result = http_client->response->get_cdata( ). |
CopyRight 2018-2019 实验室设备网 版权所有 |