+ 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.