Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10353

Change http client API to generic options hash

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • None
    • PUP 6.15.0
    • None
    • Hide

      Keep url, params, headers, options for get, post, etc
      Validate options that we currently recognize like user, password, ssl_context, include_system_store
      Some methods may need extra validation like passing content_type and body to the put method.

      Show
      Keep url, params, headers, options for get, post, etc Validate options that we currently recognize like user, password, ssl_context, include_system_store Some methods may need extra validation like passing content_type and body to the put method.
    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Enhancement
    • Hide
      This is an API change to allow more flexibility with future development. Rather than using keyword arguments, we opted to use a more generic options hash. This will ensure there are no awkward version dependencies as new features are implemented moving forward.
      Show
      This is an API change to allow more flexibility with future development. Rather than using keyword arguments, we opted to use a more generic options hash. This will ensure there are no awkward version dependencies as new features are implemented moving forward.
    • Needs Assessment

    Description

      The HTTP client API needs to use a generic options hash instead of keyword arguments for two reasons:

      1. The API currently uses keyword arguments, but we need to add a puppetserver implementation. If we add a new argument to puppet's implementation, then it will break puppetserver, unless it collects "extra" options using **options. But then we'll end up with some arguments expressed as keyword arguments and some "leftovers".
      2. Callers of the API sometimes pass options that the client implementation doesn't know about, such as compress. The API needs a way to pass options which may only be understood by one implementation. Each implementation should parse and validate options it recognizes and pass through options it doesn't.

      Attachments

        Issue Links

          Activity

            People

              melissa Melissa Stone
              josh Josh Cooper
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support