2024 Oct 15 6:38 AM - edited 2024 Oct 15 10:23 AM
I am trying to make a post request to an extrnal URL to fetch the CSRF token details which are further required to make a get request. I have attached the code below. The code is working fine in the ECC system but it is giving the error in S/4 system. Is the error related to some system configuration?
Error Text:- IcmConnInitClientSSL: Proxy connection to https://internal.yamaha-dealers.com:443 via proxy:3128 failed
CODE:-
cl_http_client=>create_by_url(
EXPORTING
url = 'https://internal.yamaha-dealers.com/oauth2/endpoint/YMUSProvider/token'
proxy_host = 'proxy'
proxy_service = '3128'
IMPORTING
client = ro_client
).
ro_client->refresh_request( ).
ro_client->request->set_version( if_http_request=>co_protocol_version_1_1 ).
ro_client->propertytype_logon_popup = 0.
"Set Method
ro_client->request->set_method( 'POST').
"Set headers
ro_client->request->set_header_fields( it_header_fields ).
DATA(lo_request) = cl_rest_message_builder=>create_http_message_entity( ro_client->request ).
lo_request->set_content_type( iv_media_type = 'application/x-www-form-urlencoded' ).
lo_request->set_string_data( 'grant_type=password&client_id=sap_user&client_secret=$someValue&username=U:externalService:sap_user&password=someValue' ).
ro_client->request->set_header_field( name = if_http_header_fields=>accept
value = if_rest_media_type=>gc_appl_www_form_url_encoded ).
it_header_fields:-
Please let me know if any more info is required.
@SAPSupport @DominikTylczyn @Mrak1 @fabio_perfetto @Margit_Wagner @AndreasMuno @Dsk @Enda @Christian_Ries @tamas_hoznek @Sandra_Rossi
Request clarification before answering.
Can you please tell how can we check is ssl certificate in strust? I am new to SAP.
@abo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
4 | |
4 | |
4 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.