protected function preparePostRequest(RequestInterface $request, $data)
    {
        if ($data !== null) {
            // Add the POST data to the request.
            $request->setOption(CURLOPT_POST, true);
            $request->setOption(CURLOPT_POSTFIELDS, $data);
        } else {
            $request->setOption(CURLOPT_CUSTOMREQUEST, 'POST');
        }
    }
protected function preparePostRequest(RequestInterface $request, $data)
    {
        if ($data !== null) {
            // Add the POST data to the request.
            $request->setOption(CURLOPT_POST, true);
            $request->setOption(CURLOPT_POSTFIELDS, $data);
        } else {
            $request->setOption(CURLOPT_CUSTOMREQUEST, 'POST');
        }
    }
protected function preparePostRequest ( RequestInterface $ request , $ data ) { if ( $ data !== null ) { // Add the POST data to the request. $ request -> setOption ( CURLOPT_POST , true ) ; $ request -> setOption ( CURLOPT_POSTFIELDS , $ data ) ; } else { $ request -> setOption ( CURLOPT_CUSTOMREQUEST , 'POST' ) ; } }
Sets a request's HTTP verb to POST.

@param RequestInterface $request
Sets a request s HTTP verb to POST .