Tebru\Retrofit\Event\BeforeSendEvent::getBody PHP Method

getBody() public method

Deprecation: Use getRequest()
public getBody ( ) : string
return string
    public function getBody()
    {
        trigger_error('Retrofit Deprecation: This method is deprecated, use getRequest() instead', E_USER_DEPRECATED);
        return (string) $this->request->getBody();
    }

Usage Example

 public function testGetBody()
 {
     $this->disableDeprecationWarning();
     $event = new BeforeSendEvent(new Request('POST', 'http://mockservice.com/post', ['foo' => 'bar'], 'body'));
     $this->assertSame('body', $event->getBody());
     $this->enableDeprecationWarning();
 }
All Usage Examples Of Tebru\Retrofit\Event\BeforeSendEvent::getBody