Skip to content

Allow HTTPX methods on the client #6

@balevine

Description

@balevine

Trying to access a couple of httpx methods yields errors.

For example, calling

client =  Httpsensible::Client.new
client.with(timeout: { connect_timeout: 10, request_timeout: 3 }).get("/")

returns

NoMethodError (undefined method `with_timeout' for an instance of Httpsensible::Client)

The same is true for client.request(requests).

However, accessing the underlying httpx client provides access to those methods. This works:

client =  Httpsensible::Client.new
client.client.with(timeout: { connect_timeout: 10, request_timeout: 3 }).request(requests)

Ideally, I think those methods would be accessible to the httpsensible client directly.

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