evancz/elm-http 3.0.1

Basic foundation for HTTP communication

Homepage: http://package.elm-lang.org/packages/elm-lang/http/latest

Platform: Elm

Language: Elm

License: BSD-3-Clause

Repository: https://github.com/evancz/elm-http

View on registry: http://package.elm-lang.org/packages/evancz/elm-http/3.0.1

Direct download link: https://github.com/evancz/elm-http/archive/3.0.1.zip

Install: elm-package install evancz/elm-http 3.0.1


Make HTTP requests in Elm.

The Http module aims to cover some of the most common cases of requesting JSON data, but also have lower-level functions such that the API covers all of the underlying functionality.


import Http
import Json.Decode as Json exposing ((:=))
import Task exposing (..)

lookupZipCode : String -> Task Http.Error (List String)
lookupZipCode query =
    Http.get places ("http://api.zippopotam.us/us/" ++ query)

places : Json.Decoder (List String)
places =
  let place =
        Json.object2 (\city state -> city ++ ", " ++ state)
          ("place name" := Json.string)
          ("state" := Json.string)
      "places" := Json.list place


3.0.1 May 10, 2016
3.0.0 November 18, 2015
2.0.0 September 10, 2015
1.0.0 April 20, 2015

Project Statistics

SourceRank 17
Dependencies 1
Dependent projects 39
Dependent repositories 619
Total releases 4
Latest release
First release
Stars 97
Forks 52
Watchers 5
Contributors 9
Repo Size: 44.9 KB

Top Contributors See all

Evan Czaplicki Richard Feldman Yann Esposito Dénes Harmath amcvega Aaron Strick Hassan Hayat Joseph Hain Samuel Rødal

Something wrong with this page? Make a suggestion

Export .ABOUT file for this library

Last synced: 2017-03-27 11:49:38 UTC

Login to resync this project