You need to sign in to do that
Don't have an account?
Krisztian Valko 5
Thanks a lot.
Krisz
Capture HTTP response
Hi Guys,
I am triggering a POST request via process builder and it works but can you please tell me how can I capture the HTTP response I get back? The external system will send me a string I would like to store on the record which started the process.
@future(callout=true) public static void calloutmethod(String name){ Http http = new Http(); HttpRequest request = new HttpRequest(); request.setEndpoint('XXX'); request.setMethod('POST'); request.setHeader('Content-Type', 'application/json;charset=UTF-8'); request.setHeader('accept', 'application/json'); request.setBody(name); response = http.send(request); }
Thanks a lot.
Krisz
All Answers
Thanks a lot. My method is void and I cannot change it because it says that a constructor cannot be non-void. But since the method is void I cannot return anything.
What do you think?
Thanks a lot.
Regards,
Krisz
Thanks for taking the time helping me. I attached the code above.
Regards,
K
Can you also explain what exactly you are trying to accomplish by the returning value that you are looking for?
Regards,
Krisz