evancz/elm-http 3.0.1

Basic foundation for HTTP communication

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


elm-http

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.

Example

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)
  in
      "places" := Json.list place

Releases

  • 3.0.1 - May 10, 2016 14:51
  • 3.0.0 - November 18, 2015 17:01
  • 2.0.0 - September 10, 2015 17:00
  • 1.0.0 - April 20, 2015 17:00

Project Statistics

SourceRank 15
Dependencies 1
Dependent projects 36
Dependent repositories 586
Total releases 4
Latest release
First release
Stars 92
Forks 41
Watchers 6
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: 2016-11-15 09:52:10 UTC