HttpRequest req = new HttpRequest();
req.setEndpoint(endpoint);
req.setBody(reportText);
req.setHeader('Content-Type','text/csv');
req.setHeader('Content-Length',String.valueOf(reportText.length()));
req.setMethod('POST');
HttpResponse response = new Http().send(req);
// Check for 200 status here
You can try the suggestions mentioned in the above developer discussion.
Let me know if it helps you and close your query by marking it as solved so that it can help others in the future.
Thanks.
Here is a sample code
See this post to learn more
If you find this information helpful, please mark this answer as Best. It may help others in the community
Thanks,
Anudeep
Thanks for your reply , i need without vf page, . my scenario is every 5 :00 Pm i need to send this file to external system.
Regards,
Arun