Skip to content

Undocumented negative return values from HTTPClient::get() #5137

Closed
@teo1978

Description

@teo1978

All I can find in the documentation about HTTPClient::get() return value is that it returns "the http code".

Sometimes it returns -1. I guess that happens when something fails while sending the request, or parsing the response (if you even got one), so there's no http code to be returned.

However

  1. that should be documented
  2. There needs to be a way to get information about what the error actually was. Did the client fail to connect to the server? Did it fail to send the request? Did it get an invalid response? What else?
    If there already exists a way to get that kind of information, then that needs to be documented too.

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