Sha256: bcfef464b7298c8620c2959d0380e37a6d1d84dd4453262bb00069846877cd4a

Contents?: true

Size: 481 Bytes

Versions: 2

Compression:

Stored size: 481 Bytes

Contents

# encoding: utf-8

module Hatetepe
  Request = Struct.new(:http_method, :uri, :headers, :body, :http_version)

  class Request
    private :http_method=, :uri=, :headers=, :body=

    include Support::Message

    # TODO: URI.join is really slow
    def initialize(http_method, uri, headers = {}, body = '')
      super(http_method,
            # URI('http://' + uri)
            URI.join('http:///', uri).request_uri,
            headers, Body.build(body), 1.1)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hatetepe-0.6.0.pre.2 lib/hatetepe/request.rb
hatetepe-0.6.0.pre.1 lib/hatetepe/request.rb