You need to sign in to do that
Don't have an account?
GAURAV SETH
Calling Webservice from Apex class, getting 302 response error
Hi,
I am calling external web services from my Apex class .
I am getting response code 302 instead of
response.getStatusCode() == 200.
If I am adding request.setHeader() Cookie value which I copied from Postman application when hitting the same web service. It works fine.
Looks like there is some configuration missing?
Can someone please help me in this ?
I am calling external web services from my Apex class .
I am getting response code 302 instead of
response.getStatusCode() == 200.
If I am adding request.setHeader() Cookie value which I copied from Postman application when hitting the same web service. It works fine.
Looks like there is some configuration missing?
Can someone please help me in this ?
if it helps.
After creating certificate in Salesforce , Do I have to share it with external site ?
I changed my httpRequest as below giving certificate name and adding Named Credentials to end point.
where 'Curam_Application' is the Named Credential defined in Setup and 'SSCert_SFBot_IBMCuram' is the certificate name
But it also do not work. Can someone please assist, what is going wrong?
Http http = new Http();
HttpRequest request = new HttpRequest();
String intake_Id = intakeId[0];
String EndPoint = 'callout:Curam_Application/v1/cwa/intakes?investigation_id='+intake_Id;
request.setEndpoint(EndPoint);
request.setMethod('GET');
request.setClientCertificateName('SSCert_SFBot_IBMCuram');
request.setTimeout(2000);
HttpResponse response = http.send(request);
Thanks,
Gaurav Seth