Status=Length Required, StatusCode=411 error in Apex callout

HttpRequest request = new HttpRequest();

request.setHeader('Content-Length', '512');


Content-Length should be mentioned to avoid this error in callouts.

Cheers!!!

No comments:

Post a Comment