Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix incorrect CURLRequest allow_redirects description #8653

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Mar 23, 2024

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
Member

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

@kenjis
Copy link
Member Author

kenjis commented Mar 25, 2024

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.

Copy link
Member

@michalsn michalsn left a comment

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
8 checks passed
@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