getSent() public method

Raw request that was sent down the wire.
public getSent ( ) : string
return string Bytes actually sent.
Ejemplo n.º 1
0
 /**
  *    Extracts all of the response information.
  *    @param SimpleHttpResponse $response    Response being parsed.
  *    @access private
  */
 protected function extractResponse($response)
 {
     $this->transport_error = $response->getError();
     $this->raw = $response->getContent();
     $this->sent = $response->getSent();
     $this->headers = $response->getHeaders();
     $this->method = $response->getMethod();
     $this->url = $response->getUrl();
     $this->request_data = $response->getRequestData();
 }
Ejemplo n.º 2
0
 /**
  *    Extracts all of the response information.
  *    @param SimpleHttpResponse $response    Response being parsed.
  *    @access private
  */
 function _extractResponse($response)
 {
     $this->_transport_error = $response->getError();
     $this->_raw = $response->getContent();
     $this->_sent = $response->getSent();
     $this->_headers = $response->getHeaders();
     $this->_method = $response->getMethod();
     $this->_url = $response->getUrl();
     $this->_request_data = $response->getRequestData();
 }
Ejemplo n.º 3
0
 public function testBadSocketDuringResponse()
 {
     $socket = new MockSimpleSocket();
     $socket->setReturnValueAt(0, "read", "HTTP/1.1 200 OK\r\n");
     $socket->setReturnValueAt(1, "read", "Date: Mon, 18 Nov 2002 15:50:29 GMT\r\n");
     $socket->setReturnValue("read", "");
     $socket->setReturnValue('getSent', 'HTTP/1.1 ...');
     $response = new SimpleHttpResponse($socket, new SimpleUrl('here'), new SimpleGetEncoding());
     $this->assertTrue($response->isError());
     $this->assertEqual($response->getContent(), '');
     $this->assertEqual($response->getSent(), 'HTTP/1.1 ...');
 }