Guest User

Untitled

a guest
Jan 19th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. String Body = 'notice='+ EncodingUtil.base64Encode(blob.valueof(Payload));
  2.  
  3.  
  4. HttpRequest Publishreq = new HttpRequest();
  5. Publishreq.setHeader('Authorization',Token);
  6. Publishreq.setHeader('Accept','application/json');
  7. Publishreq.setBody(Body);
  8. Publishreq.setmethod('POST');
  9.  
  10. Publishreq.setEndpoint( 'https://endpoint.com/api/qualification/latest/notice/submit');//+Body);
  11.  
  12. HTTP Publish = new HTTP();
  13. HTTPResponse PublishResponse =new HttpResponse();
  14.  
  15. PublishResponse = Publish.send(Publishreq);
  16.  
  17. curl -X POST -F notice=SomeBase64XML -H "Authorization: Basic SomeBase64Credential" https://endpoint.com/api/qualification/latest/notice/submit
Add Comment
Please, Sign In to add comment