1

I'm facing some problems getting authenticated with a web application via HTTPS,

Is it possible to send an HTTPS (POST/GET) via the interface if_http_client?

  • If yes, what should I add to make it compatible with HTTPS?

    • Which method is the best in this case create, create_by_destination or create_by_url?
  • If no, what is another way to do it?

Thanks.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48

3 Answers3

1

1) Yes, you definitely can

2) You need to check if HTTPS service is activated on your WEB AS at all. The HTTPs service is deactivated by default. You can check the service via SM59:

  • create a new HTTP connection of type G via SM59
  • fill the Target host field, Path prefix and Service number (host name, HTTP document and the port number accordingly)
  • Switch the connection to 'Default SSL' on 'Logon & Security' tab.
  • save your changes
  • click Connection Test

If the HTTPS is not configured you will have an HTTPS error message. Check it with your basis team and activate HTTPs service. If the HTTPS service is running you will have another message (authorization required, wrong document or just Ok status).

3) Actually you can use all of them and each of them has own advantages. If you use create_by_url you must fill the HTTP address field like 'https://...' The http client class will define autmatically which protocol must be used (HTTP or HTTPs). Personally I use create_by_url.

Hope this helps.

Skalozub
  • 539
  • 7
  • 26
  • i tried the 3 methodes but i got the same error in all of them it was a missing SSL certificate . Thank you for your response it very helpful . – Yassine Bouchama May 24 '17 at 10:42
0

I can't say best, but we've used cl_http_client=>create_by_destination along with an SSL enabled RFC destination in SM59 and it has worked pretty smoothly.

Bryan Cain
  • 1,736
  • 9
  • 17
0

make sure to add the certificates in STRUST

Also check transaction SMICM -> Goto -> Trace File -> Display End