Skip to content

Can't get only the HTTP response code on consuming REST API #146

@glaubergad

Description

@glaubergad

Can't understand.
How can I access response->code to obtain only the code INT of the response? When I try to get it, it comes along with all the response variables.

$response = Unirest\Request::get($url, $header);

If I try to get $response->code, it comes with everything the API returned body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions