Project

scorn

0.0
The project is in a healthy, maintained state
A stupid HTTP client library. Consider with scorn.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Project Readme

scorn

tests gem version

A stupid HTTP client library.

r = Scorn.get('https://example.com/data.json')

p r._response._c # => 200
r = Scorn.get('https://httpbin.org/get', json: true)

p r._response._c # => 200
p r['args'] # => {}
p r['headers']['Host'] # => 'httpbin.org'
p r['headers']['Accept'] # => 'application/json'
p r['url'] # => 'https://httpbin.org/get'
r = Scorn.post(
  'https://httpbin.org/post',
  data: { source: 'src', target: 'tgt', n: -1 },
  debug: $stderr)

p r._response._c # => 200
p r._response._sta # => 'OK'
p r._response.code # => '200'

p r.class # => Hash
p r['form'] # => { 'n' => '-1', 'source' => 'src', 'target' => 'tgt' }

LICENSE

MIT, see LICENSE.txt