Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/emancu/achetepe

Asynchronous HTTP Requests using Threads
https://github.com/emancu/achetepe

Last synced: 24 days ago
JSON representation

Asynchronous HTTP Requests using Threads

Awesome Lists containing this project

README

        

achetepe
========

Asynchronous HTTP Requests using Threads

## Dependencies

`achetepe` requires Ruby 1.9 or later.

Install dependencies using `dep` is easy as run:

dep install

### Development and Testing dependencies

Start test server

rake test:start_server

Run tests

rake

Stop test server

rake test:stop_server

## Instalation

As simple as

$ gem install achetepe

## Getting started

`achetepe` makes an HTTP request to run in background using __Threads__ and when you get a response, it will execute a block (a.k.a _callback function_)

### GET

Achetepe.get('https://github.com/emancu/achetepe') do |response|
puts response
end

# => #
# => #

### POST

Achetepe.post('http://www.example.com/search.cgi', q: 'ruby') do |response|
puts response
end

# => #
# => #

### PUT

Coming soon..