write_header(sock, ver, path) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/net/http/generic_request.rb, line 324
  def write_header(sock, ver, path)
    reqline = "#{@method} #{path} HTTP/#{ver}"
    if /[\r\n]/ =~ reqline
      raise ArgumentError, "A Request-Line must not contain CR or LF"
    buf = ""
    buf << reqline << "\r\n"
    each_capitalized do |k,v|
      buf << "#{k}: #{v}\r\n"
    buf << "\r\n"
    sock.write buf
Register or log in to add new notes.