<commit_before>= REST Client -- simple DSL for accessing HTTP and REST resources

A simple HTTP and REST client for Ruby, inspired by the Sinatra's microframework style
of specifying actions: get, put, post, delete.

* Main page: http://github.com/archiloque/rest-client
* Mailing list: <EMAIL> (send a mail to subscribe).
* IRC: #rest-client at freenode

== Usage: Raw URL

  require 'rest_client'

  RestClient.get 'http://example.com/resource'

  RestClient.get 'http://example.com/resource', {:params => {:id => 50, 'foo' => 'bar'}}

  RestClient.get 'https://user:password@example.com/private/resource', {:accept => :json}

  RestClient.post 'http://example.com/resource', :param1 => 'one', :nested => { :param2 => 'two' }

  RestClient.post "http://example.com/resource", { 'x' => 1 }.to_json, :content_type => :json, :accept => :json

  RestClient.delete 'http://example.com/resource'

  response = RestClient.get 'http://example.com/resource'
  response.code
  ➔ 200
  response.cookies
  ➔ {"Foo"=>"BAR", "QUUX"=>"QUUUUX"}
  response.headers
  ➔ {:content_type=>"text/html; charset=utf-8", :cache_control=>"private" ...
  response.to_str
  ➔ \n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n   \"http://www.w3.org/TR/html4/strict.dtd\">\n\n<html ....

  RestClient.post( url,
    {<commit_msg>removing IRC channel as it's mostly dead<commit_after>= REST Client -- simple DSL for accessing HTTP and REST resources

A simple HTTP and REST client for Ruby, inspired by the Sinatra's microframework style
of specifying actions: get, put, post, delete.

* Main page: http://github.com/archiloque/rest-client
* Mailing list: <EMAIL> (send a mail to subscribe).

== Usage: Raw URL

  require 'rest_client'

  RestClient.get 'http://example.com/resource'

  RestClient.get 'http://example.com/resource', {:params => {:id => 50, 'foo' => 'bar'}}

  RestClient.get 'https://user:password@example.com/private/resource', {:accept => :json}

  RestClient.post 'http://example.com/resource', :param1 => 'one', :nested => { :param2 => 'two' }

  RestClient.post "http://example.com/resource", { 'x' => 1 }.to_json, :content_type => :json, :accept => :json

  RestClient.delete 'http://example.com/resource'

  response = RestClient.get 'http://example.com/resource'
  response.code
  ➔ 200
  response.cookies
  ➔ {"Foo"=>"BAR", "QUUX"=>"QUUUUX"}
  response.headers
  ➔ {:content_type=>"text/html; charset=utf-8", :cache_control=>"private" ...
  response.to_str
  ➔ \n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\n   \"http://www.w3.org/TR/html4/strict.dtd\">\n\n<html ....

  RestClient.post( url,
    {
{'fraction_non_alphanumeric': 0.18359524722115753, 'fraction_numerical': 0.011498658489842852, 'mean_word_length': 3.8603351955307263, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 35, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '853649', 'n_tokens_mistral': 968, 'n_tokens_neox': 882, 'n_words': 220}