Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
cURL request causing 404
  • Here’s my object
    object(Fuel\Core\Request_Curl)[22]
    protected 'preserve_resource' => null
    protected 'resource' => string 'https://www.w-space.com/' (length=24)
    protected 'params' =>
    array (size=0)
    empty
    protected 'default_params' =>
    array (size=0)
    empty
    protected 'options' =>
    array (size=4)
    42 => boolean true
    19913 => boolean true
    2 => boolean true
    52 => boolean true
    protected 'default_options' =>
    array (size=0)
    empty
    protected 'headers' =>
    array (size=0)
    empty
    protected 'response' => null
    protected 'response_info' =>
    array (size=0)
    empty
    protected 'auto_format' => boolean true
    protected 'method' => string 'POST' (length=4)

    Soon as I run $curl->execute() it throws a 404. Any ideas?
  • If I change the URL to one that I know returns 404, the status is 0.
  • HarroHarro
    Accepted Answer
    The curl driver throws a RequestException (which extends HttpNotFoundException) when the response body is empty (the result of curl_exec()). So your request returns no data.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion