Api.php
protected function doRequest(FormRequest $request)
    {
        $request->setMethod('POST');
        $request->fromUrl($this->getApiEndpoint());

        $this->client->send($request, $response = new Response);

        if (false == $response->isSuccessful()) 
		{
            throw HttpException::factory($request, $response);
        }
		else
		{
			return $response->toArray();
		}
    }
protected function doRequest(FormRequest $request)
    {
        $request->setMethod('POST');
        $request->fromUrl($this->getApiEndpoint());

        $this->client->send($request, $response = new Response);

        if (false == $response->isSuccessful()) 
		{
            throw HttpException::factory($request, $response);
        }
		else
		{
			return $response->toArray();
		}
    }
@param FormRequest $request

@throws HttpException

@return array