0.0
No commit activity in last 3 years
No release in over 3 years
Makes it easy to take you curl hacking from bash to ruby
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

Gem Version

#curl wrapper

curl_wrapper is a ruby wraper for the curl command.

install

  gem install curl_wrapper

use

  curl = CurlWrapper.new do |config|
    config.url 'rubygems.org'
  end
  puts curl.body
  curl = CurlWrapper.new do |config|
    config.ntlm
    config.user 'username/password'
    config.request 'POST'
    config.verbose
    config.url 'http://hard_to_automate.sharepoint.com/resource'
  end

  curl.run
  puts curl.error

CurlWrapper is chanable

  puts CurlWrapper.new.url('rubygems.org').run.body
  curl = CurlWrapper.new do |config|
    config.ntlm
    config.user 'username/password'
    config.request 'POST'
  end

  curl.verbose.url 'http://hard_to_automate.sharepoint.com/resource'

  puts curl.run.error

CurlWrapper is autoruns when you need the output

  puts CurlWrapper.new.url('rubygems.org').body
  curl = CurlWrapper.new do |config|
    config.ntlm
    config.user 'username/password'
    config.request 'POST'
  end

  curl.verbose.url 'http://hard_to_automate.sharepoint.com/resource'

  puts curl.error

CurlWrapper just works so you can have fun exploring HTTP

lets just skip new and body and stil get what we want

  puts CurlWrapper.url('rubygems.org')
  curl = CurlWrapper do |config|
    config.ntlm
    config.user 'username/password'
    config.request 'POST'
  end.verbose.url( 'http://hard_to_automate.sharepoint.com/resource' )

  puts curl