Class: Blitz::Curl::Sprint::Request
- Inherits:
 - 
      Object
      
        
- Object
 - Blitz::Curl::Sprint::Request
 
 
- Defined in:
 - lib/blitz/curl/sprint.rb
 
Overview
Represents the request object generated by the sprint. Contains all of the headers and POST/PUT data, if any.
Instance Attribute Summary collapse
- 
  
    
      #content  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
POST/PUT content, if any.
 - 
  
    
      #headers  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
All of the request headers (as a Hash of name/value pairs).
 - 
  
    
      #line  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The entire request line (GET / HTTP/1.1, for example).
 - 
  
    
      #method  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The method used in the request.
 - 
  
    
      #url  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
The URL, including path, query arguments and hash fragments.
 
Instance Method Summary collapse
- 
  
    
      #initialize(json)  ⇒ Request 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
:nodoc:.
 
Constructor Details
#initialize(json) ⇒ Request
:nodoc:
      25 26 27 28 29 30 31  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 25 def initialize json # :nodoc: @line = json['line'] @method = json['method'] @url = json['url'] @content = json['content'].unpack('m')[0] @headers = json['headers'] end  | 
  
Instance Attribute Details
#content ⇒ Object (readonly)
POST/PUT content, if any
      23 24 25  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 23 def content @content end  | 
  
#headers ⇒ Object (readonly)
All of the request headers (as a Hash of name/value pairs)
      20 21 22  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 20 def headers @headers end  | 
  
#line ⇒ Object (readonly)
The entire request line (GET / HTTP/1.1, for example)
      11 12 13  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 11 def line @line end  | 
  
#method ⇒ Object (readonly)
The method used in the request
      14 15 16  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 14 def method @method end  | 
  
#url ⇒ Object (readonly)
The URL, including path, query arguments and hash fragments
      17 18 19  | 
    
      # File 'lib/blitz/curl/sprint.rb', line 17 def url @url end  |