Reply
Regular Contributor
DeepakKapoor81
Posts: 10

Http Callout to Salesforce

Hi ,

 

I am quiet new to HTTP Callout. I am making a HTTP callout to login with other Salesforce user, get the sessionId and with this sessionId I am maing a new request to invoke a VF page by setting the Sessionid in Cookies of new request.

 

req.setHeader('Cookie','sid='+sid);

In debug log I the response.getbody is:

The URL has moved <a href="https://c.ap1.visual.force.com/apex/updatemyprofile?contactid=00390000001lvf3">here</a>

 

which is the endpoint given in the request of VF page.

But the problem is the controller associated with VF page is not getting executed and performing the function.

 

Can you please let mw know where I am wrong. I cannot change the scenarion and need to make callout only to call this VF page.