0.01
No commit activity in last 3 years
No release in over 3 years
HTTP/HTTPS communication module with logging, filtering and easy SSL configuration
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.9.7
 Project Readme
= Network

== DESCRIPTION:

HTTP/HTTPS communication module based on ruby net/http, net/https modules.
Network allows you to make POST http/https requests more easy and quicker. 

I wrote Network because I need the same functionality in many different places.

== EXAMPLES:

  Fast:
    
    require 'network'

    body = Network.post("http://example.com/", "escaped_data")

  With configuration:

    require 'network'

    connection = Network::Connection.new("http://example.com/")

    connection.request_filter  = Proc.new {|req| req.gsub(/\d/, "X")}
    connection.response_filter = Proc.new {|res| res.gsub(/\d/, "X")}

    # server requires client certificate verification 
    c.pem_file = 'client.pem'
    
    connection.post('one=1&two=2')

== FEATURES:

  * Request and response logging
  * Request and response filtering
  * easy SSL configuration
  * Net::HTTP exceptions handling

== INSTALLATION:

  Run the following if you haven't already:
  gem sources -a http://gems.github.com

  Install the gem: 
  sudo gem install alovak-network

== REQUIREMENTS:

  Gems:
  * mocha #for tests

== LICENSE:

(The MIT License)

Copyright (c) 2009 Pavel Gabriel

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.