Class: HTTP_Spew::HitNRun

Inherits:
Request
  • Object
show all
Defined in:
lib/http_spew/hit_n_run.rb

Overview

An even more horrible way to make HTTP requests, just make them without reading a response!

Constant Summary collapse

RESPONSE =

frozen response

[ 666,
{
  "Content-Length" => "0".freeze,
  "Content-Type" => "hit/run".freeze
}.freeze,
[].freeze ].freeze

Instance Attribute Summary

Attributes inherited from Request

#error, #response, #to_io

Instance Method Summary collapse

Methods inherited from Request

#close, #each, #initialize, #resume, #run, #start_sock, #too_big!

Methods included from Headers

env_to_headers, request_uri

Constructor Details

This class inherits a constructor from HTTP_Spew::Request

Instance Method Details

#read_responseObject

we close the connection once we’re ready to read the response to save bandwidth



17
18
19
20
# File 'lib/http_spew/hit_n_run.rb', line 17

def read_response
  close
  RESPONSE
end