+ Start a Discussion
Diwakar G 7Diwakar G 7 

Read timed out - Error

Hi,

When I clicked on submit button in visualforce (VF) page it will call the below savePro() function. In the function, I am making post request and returning VF page.
public pagereference savePro(){
        PageReference myVFPage = new PageReference('/apex/Successpage');
        String  jsonData = '[{"name":"'+UserInfo.getUserName()+'"},{"email":"'+UserInfo.getUserEmail()+'"},{"userstory":"'+selected_user_list+'"}']';
		myVFPage.setRedirect(true); 
		String endpoint = 'https://********************';
		HttpRequest req = new HttpRequest();
		req.setEndpoint(endpoint);
        req.setHeader('Accept', 'application/json');
		req.setMethod('POST');
		req.setbody(jsonData);
		Http http = new Http();
		 http.send(req);
        return myVFPage;
    }
But, I am getting the below error.

User-added image
Thanks and Regards,
Diwakar G