cossack~naqvis

Simple and flexible HTTP client for Crystal with middleware and test support.
0.1.0 released
naqvis/cossack
1
Ali Naqvi

Cossack crystal Cossack logo

Simple and flexible HTTP client for Crystal programming language.

Roadmap

  • [x] Middleware support
  • [x] Use URI to parse URL
  • [x] Allow Client be initialized with base url
  • [x] support headers for individual request
  • [x] support headers for Client
  • [x] Support of all HTTP verbs
    • [x] get
    • [x] post
    • [x] put
    • [x] patch
    • [x] delete
    • [x] head
    • [x] options
  • [x] Implement class methods, like Cossack.get, Cossack.post, etc..
  • [x] Swapping connections like Hurley does
  • [x] Timeout
  • [ ] Beta test of API
    • [ ] Update GoogleTranslate client to use Cossack
    • [ ] Update Glosbe client to use Cossack
  • [ ] Follow redirections
  • [ ] Examples
  • [ ] Unit tests
  • [ ] Additional sugar
    • [ ] Pass headers to Response.new and Request.new as Hash(String, String)
    • [ ] Add :headers argument to http methods
    • [ ] status methods for response (success?, redirect?, etc..)
  • [x] Acceptance tests
  • [ ] Good documentation, describing the concept and usage.
  • [ ] First release!
  • [ ] SSL
  • [ ] Proxy

Installation

Add this to your application's shard.yml:

dependencies:
  cossack:
    github: greyblake/crystal-cossack

And install dependencies:

crystal deps

Usage

require "cossack"

cossack = Cossack.new
cossack.get("http://some.url/path")

Development

To run test:

make test

Contributors

  • greyblake Sergey Potapov - creator, maintainer
cossack:
  github: naqvis/cossack
  version: ~> 0.1.0
License MIT
Crystal none

Authors

Dependencies 0

Development Dependencies 2

  • kemal
    {'github' => 'sdogruyol/kemal'}
  • spec2 ~> 0.8
    {'github' => 'waterlink/spec2.cr', 'version' => '~> 0.8'}

Dependents 1

Last synced .
search fire star recently