Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upHttp package not available in 3.0.0 #524
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Mar 14, 2016
Contributor
What exactly is failing for you? Can you show an example and any error messages you get?
|
What exactly is failing for you? Can you show an example and any error messages you get? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
linoor
Mar 14, 2016
Ok so basically i'm trying to make a button make a post request with some json data. At first I tried to use post function but when I tested it it turned out that I kept getting 415 Unsupported Media Type error. I figured out that it's beacuse the post function doesn't set the header to application/json. After that I tried using the Http.request function like this:
postJson : String -> Request String
postJson body =
Http.request "POST" "http://127.0.01.8080/start_timer" body [("Header-Type", "application/json")]
but I kept getting an error:
elm-make main/static/app.elm --yes --warn --output=elm.js
�[36m-- NAMING ERROR -------------------------------------------- main/static/app.elm
Cannot find variable `Http.request`.
44│ Http.request "POST" "http://127.0.01.8080/start_timer" body
^^^^^^^^^^^^
`Http` does not expose `request`. Maybe you want one of the following?
Http.Request
So I tried to look in the docs at http://package.elm-lang.org/packages/elm-lang/core/1.0.0/Http to see why is it like that. I use version 3.0.0 of elm-html (at least that was what the package manager told when when it was installing it) so I wanted to see the docs for version 3.0.0 but I keep getting 404 error here: http://package.elm-lang.org/packages/elm-lang/core/3.0.0/Http. Then I looked in the source and I didn't see Http.elm file for the 3.0.0 tag so that's why I started to wonder if it's not available anymore in that version.
Thanks!
linoor
commented
Mar 14, 2016
|
Ok so basically i'm trying to make a button make a post request with some json data. At first I tried to use
but I kept getting an error:
So I tried to look in the docs at Thanks! |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jvoigtlaender
Mar 14, 2016
Contributor
Quite a while ago, the Http module was moved out of the elm-lang/core package, and into the new evancz/elm-http package. So to look at the current docs, you need to visit this page: http://package.elm-lang.org/packages/evancz/elm-http/3.0.0/Http
|
Quite a while ago, the |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
linoor
commented
Mar 15, 2016
|
Damn, thanks, I guess that closes the issue. |
linoor commentedMar 14, 2016
Hello,
I can't seem to find the Http package in version 3.0.0 even though the
elm-package install evancz/elm-httpkeeps telling me that it's the latest version of the package.Is it not available in version 3.0.0? Should I use some other version (1.0.0) or is there some new way to make requests?