function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vandy7Vandy7 

Getting body of HTTP response

Hai all,

 

Can anyone suggest me the way of storing the body content of the HTTP response.

 

Plesae help me with this,its urgent....

incuGuSincuGuS

Hey Vandy7,

 

So let me get this, you did a callout and you need to store the HTTP Response somewhere in your org?

If thats the case, you could create a custom object to store the callouts responses "CalloutResponse__c" (or whatever) and create a custom String field on it.  Then just do

 

 

CalloutResponse__c cr = new CalloutReponse__c();
cr.body__c = response.getBody();
insert cr;

 

 

But im guessing this is a bit more complicate than that, could you explain a bit more?

 

Hope i can help you out,

Gaston.