Skip to content

Http.Request fails with patch method #67

Description

@tryzniak

I'm 99% sure I spotted a bug in Elm. If I try to make a request below

    Http.request
        { method = "patch"
        , headers = []
        , url = Endpoint.singleTaxi n
        , body = body
        , expect = Http.expectJson toMsg taxiDecoder
        , timeout = Nothing
        , tracker = Nothing
        }

I get the following error:

Location: http://localhost:3333/api/taxis/12
Line Number 1, Column 1:

If I uppercase patch then everything works fine!
The request below works line:

   Http.request
        { method = "PATCH"
        , headers = []
        , url = Endpoint.singleTaxi n
        , body = body
        , expect = Http.expectJson toMsg taxiDecoder
        , timeout = Nothing
        , tracker = Nothing
        }

Tested on Firefox 70.
I think the offending line is

xhr.open(request.__$method, request.__$url, true);

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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