Skip to content

Header key with underscore being converted to a dash  #641

@kroe761

Description

@kroe761

I am trying to create a POST request that contains the key app_token in the header. My code

HTTP.headers({:app_token => "some-guid-token"})
         .post("https://service.mycompany.net/",
                     json: { key: "value"})

However, when I make my call, I am notified that app_token was not proved. Looking at the req in HTTP::Client.request, I see that the header has been converted to App-Token. This is causing my request to fail. Is there a workaround? We are using version 4.4.1.

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