Skip to content

get rid of global state #73

@rubiii

Description

@rubiii

it prevents e.g. using multiple loggers for HTTPI in one project.
i would like to see all methods on the HTTPI module which deal with global state gone.
i already did this for several savonrb libraries including nori for the savon 2.0 release.

here's the list of methods that come to mind:

  • HTTPI.adapter=
  • HTTPI.log=
  • HTTPI.logger=
  • HTTPI.log_level=

maybe, if we changed the HTTPI module to a class, we could create HTTPI instances which hold these options. the static http request method on the new HTTPI class like .post could then be changed to shortcuts for creating a new instance with options and executing a request.

don't know if that's the best idea though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions