Giter Site home page Giter Site logo

dumbris / hackney_lib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benoitc/hackney_lib

0.0 2.0 0.0 491 KB

WEB toolkit including miscellaneous modules to play with HTTP and Web protocols

License: Other

CSS 0.64% Erlang 95.81% Elixir 3.50% Shell 0.05%

hackney_lib's Introduction

hackney_lib - Web toolkit

Copyright (c) 2014 Benoît Chesneau.

Version: 0.2.4

hackney

hackney_lib is a WEB toolkit including miscellaneous modules to play with HTTP and Web protocols

Main features:

  • low memory usage
  • binary only
  • Full HTTP parser in Erlang for clients and servers
  • HTTP dates parsing
  • Cookie encoding/decoding
  • HTTP headers parsing
  • Multipart encoding/Idecoding
  • Miscellaneous functions to handle URIs

Coming:

  • SPDY protocol support
  • Websocket protocol support

Useful modules are:

  • hackney_http: HTTP parser in pure Erlang. This parser is able to parse HTTP responses and requests in a streaming fashion. If not set it will be autodetect if it's a request or a response if needed.

  • hackney_headers Module to manipulate HTTP headers

  • hackney_cookie: Module to manipulate cookies.

  • hackney_multipart: Module to encode/decode multipart.

  • hackney_url: Module to parse and create URIs.

  • hackney_date: Module to parse HTTP dates.

Read the NEWS file to get last changelog.

Installation

Download the sources from our Github repository

To build the application simply run 'make'. This should build .beam, .app files and documentation.

To run tests run 'make test'. To generate doc, run 'make doc'.

Or add it to your rebar config

{deps, [
    ....
    {hackney_lib, ".*", {git, "git://github.com/benoitc/hackney_lib.git", {branch, "master"}}}
]}.

Basic usage

The basic usage of hackney is:

Start hackney_lib

hackney is an OTP application. You have to start it first before using any of the functions. The hackney application will start the default socket pool for you.

To start in the console run:

$ erl -pa ebin -pa deps/mimetypes/ebin

It will start hackney_lib and all of the application it depends on:

application:start(mimetypes),
application:start(hackney_lib).

Or add hackney_lib to the applications property of your .app in a release

Contribute

For issues, comments or feedback please create an issue.

Notes for developers

If you want to contribute patches or improve the docs, you will need to build hackney using the rebar_dev.config file. It can also be built using the Makefile:

$ make dev ; # compile & get deps
$ make devclean ; # clean all files

Modules

hackney_bstr
hackney_cookie
hackney_date
hackney_headers
hackney_http
hackney_multipart
hackney_url

hackney_lib's People

Contributors

aerosol avatar altrg avatar benoitc avatar depressed-pho avatar dieswaytoofast avatar dumbris avatar edgurgel avatar gdamjan avatar jlouis avatar keynslug avatar khia avatar l4u avatar nox avatar rj avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.