public function post($url, $body = null, $type = 'application/octet-stream',
        $timeout = null, array $headers = []
    ) {
        $client
            = $this->createClient($url, \Zend\Http\Request::METHOD_POST, $timeout);
        $client->setRawBody($body);
        $client->setHeaders(
            array_merge(
                ['Content-Type' => $type, 'Content-Length' => strlen($body)],
                $headers
            )
        );
        return $this->send($client);
    }
public function post($url, $body = null, $type = 'application/octet-stream',
        $timeout = null, array $headers = []
    ) {
        $client
            = $this->createClient($url, \Zend\Http\Request::METHOD_POST, $timeout);
        $client->setRawBody($body);
        $client->setHeaders(
            array_merge(
                ['Content-Type' => $type, 'Content-Length' => strlen($body)],
                $headers
            )
        );
        return $this->send($client);
    }
public function post ( $ url , $ body = null , $ type = 'application/octet-stream' , $ timeout = null , array $ headers = [ ] ) { $ client = $ this -> createClient ( $ url , \ Zend \ Http \ Request :: METHOD_POST , $ timeout ) ; $ client -> setRawBody ( $ body ) ; $ client -> setHeaders ( array_merge ( [ 'Content-Type' => $ type , 'Content-Length' => strlen ( $ body ) ] , $ headers ) ) ; return $ this -> send ( $ client ) ; }
Perform a POST request.

@param string $url     Request URL
@param mixed  $body    Request body document
@param string $type    Request body content type
@param float  $timeout Request timeout in seconds
@param array  $headers Request http-headers

@return \Zend\Http\Response
Perform a POST request .