Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Enhance RequestMethod::submit method #19

@peter279k

Description

@peter279k

The RequestMethod::submit should be enhanced because the return value is not good enough to users.

If the users use the GuzzleGet class to do HTTP request, it will return the GuzzleHttp\Psr7\Response object. I think it's the flexible way to let users get response headers and HTTP status code by themselves.

If the users use the Get class to do HTTP request, it will only return the response content.

They cannot receive any HTTP response headers and status code via submit method.

But it's possible to use file_get_contents to get HTTP headers and status code.

Please consider this official PHP reference and we can know using $http_response_header to get response HTTP headers after calling file_get_contents.

Maybe we can return array when using Get::submit method?

@iranianpep, do you have any idea about this? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions