Tebru\Retrofit\Event\BeforeSendEvent::getBody PHP 메소드

getBody() 공개 메소드

사용 중단: Use getRequest()
public getBody ( ) : string
리턴 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

예제 #1
0
 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