Stop this server.
Posts data to a host; returns a Net::HTTPResponse
object.
Argument url
must be a URI
; argument data
must be a hash:
_uri = uri.dup _uri.path = '/posts' data = {title: 'foo', body: 'bar', userId: 1} res = Net::HTTP.post_form(_uri, data) # => #<Net::HTTPCreated 201 Created readbody=true> puts res.body
Output:
{ "title": "foo", "body": "bar", "userId": "1", "id": 101 }
Validates typecode v
, returns true
or false
.
Iterates over each option, passing the option to the block
.
Sym#useless?
, Rule#useless?
FIXME: what means “useless”?