0.01
No release in over 3 years
Low commit activity in last 3 years
ForwardSlash makes REST a first-class citizen of the Ruby programming language. Rather than forcing developers to write code that makes calls to URLs over HTTP, ForwardSlash lets you drop the URL right in your code - no more worrying about what HTTP is. This blog post explains it best: http://blog.sinjakli.co.uk/2016/04/04/forwardslash-taking-back-the-restful-operator/
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.10.1
~> 3.4.0
~> 1.22.6

Runtime

 Project Readme

ForwardSlash

An HTTP client with REST literals

Description

ForwardSlash makes REST a first-class citizen of the Ruby programming language. Rather than forcing developers to write code that makes calls to URLs over HTTP, ForwardSlash lets you drop the URL right in your code - no more worrying about what HTTP is. This blog post explains it best.

Getting started

Install the gem:

gem install forward-slash

Require the module:

require 'forward_slash'

Then include the ForwardSlash module in a class you want to make HTTP calls from, and you're good to go! Here's a runnable example (taken from the examples folder):

$LOAD_PATH.unshift 'lib'
require "forward_slash"

class CurrentIp
  include ForwardSlash

  def self.print
    result = http://ifconfig.me/ip
    puts result
  end
end

CurrentIp.print

Limitations

Anything that isn't valid Ruby syntax is unsupported, including:

  • Query strings
  • Trailing slashes on URLs

Compatibility

The tests are run against all versions of Ruby currently supported by the core team. Anything else is unsupported.

Should I use this?

#yeauxleaux

I regret nothing