Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

post/put/patch methods must specify all headers if present in options passed to method #100

Description

@rollyjoel

LookerSDK.client. merge_content_type_if_body fails to delete options[:headers] (as for instance LookerSDK.client.parse_query_and_convenience_headers correctly does) so the caller must supply content_type in order for the call to work.

E.g I'd expect the following to pass both "my-header" and "content_type" headers to the server:

sdk.create_some_resource(
  {resource_name: "foo", an_attr: "bar"},
  {headers: {"my-header" => "something"}},
)

instead it only passes "my-header" and so the caller must do the following to get it to work:

sdk.create_some_resource(
  {resource_name: "foo", an_attr: "bar"},
  {headers: {content_type: "application/json", "my-header" => "something"}},
)

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