Skip to content

improve method usability wrt configuration options #27

@mrtazz

Description

@mrtazz

We have now introduced some more configurable options like auth and timeouts, and are looking to add support for headers and cookies. We also have 2 ways now to set configuration options: via passed in parameters and via helper methods. I think this should be converged into one way of doing configuration. So we basically have two options:

  1. Introduce a configuration struct and keep the static nature of the methods
    This means the calling convention stays mostly the same, but for more advanced usage patterns we will have to pass in a struct with options like timeout, headers, etc set.
  2. Go a more OO oriented route.
    This basically means turning the static namespace into an object and being able to call helper methods on it like set_timeout().

I'm not convinced yet which one is nicer to use, so I'm open for feedback on this one.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions