You need to sign in to do that
Don't have an account?
Rakesh Sharma 78
How to call external rest api in insecure way from salesforce apex code similar to -k in curl
Hi,
I am trying to call rest api from apex code but due to server restrictions we cannot do anything about certificate changes on target server. So, i want to call that API similar to -k or --insecure option in curl. I am getting result when i call directly with -k option using curl.
curl -k https://<URL>. --working
----------------
request.setEndpoint('https//<URL>'); --not working.
request.setMethod('GET');
-----------
Thanks for help in advance.
I am trying to call rest api from apex code but due to server restrictions we cannot do anything about certificate changes on target server. So, i want to call that API similar to -k or --insecure option in curl. I am getting result when i call directly with -k option using curl.
curl -k https://<URL>. --working
----------------
request.setEndpoint('https//<URL>'); --not working.
request.setMethod('GET');
-----------
Thanks for help in advance.
But CURL command will not work in apex becasue apex dnt understaand what is it