Skip to content

docs: fix incorrect CURLRequest allow_redirects description - #8653

Merged
kenjis merged 3 commits into
codeigniter4:developfrom
kenjis:fix-curlrequest.rst
Mar 26, 2024
Merged

kenjis merged 3 commits into
codeigniter4:developfrom
kenjis:fix-curlrequest.rst

Conversation

@kenjis

@kenjis kenjis commented Mar 23, 2024

Copy link
Copy Markdown
Member

Description

  • fix description
<?php

namespace App\Controllers;

class Home extends BaseController
{
    public function index(): string
    {
        $client   = \Config\Services::curlrequest();
        $response = $client->request('GET', 'http://google.com');

        return $response->getBody();
    }
}

You will see:

301 Moved
The document has moved here.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the documentation Pull requests for documentation only label Mar 23, 2024
@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Mar 23, 2024
@michalsn

Copy link
Copy Markdown
Member

Was the description incorrect from the beginning, or did something change in the code?

@kenjis

kenjis commented Mar 25, 2024

Copy link
Copy Markdown
Member Author

The description was incorrect from the beginning.

The feature was introduced in 869fb76dbc0?w=1#diff-c1b09d9175e885241fedeb4f406e7c19e3a78397538be28b70492647ae0c4bbaR499
This code is the same as the current code.
If we don't specify allow_redirects, it does nothing.
And CURL does not follow redirects by default.

@michalsn michalsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, thanks for explanation.

@kenjis
kenjis merged commit a8d1a89 into codeigniter4:develop Mar 26, 2024
@kenjis
kenjis deleted the fix-curlrequest.rst branch March 26, 2024 06:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Verified issues on the current code behavior or pull requests that will fix them documentation Pull requests for documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants