Class: Net::HTTPGenericRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/stardog.rb

Instance Method Summary collapse

Instance Method Details

#write_header(sock, ver, path) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/stardog.rb', line 11

def write_header(sock, ver, path)
  buf = "#{@method} #{path} HTTP/#{ver}\r\n"
  each_capitalized do |k,v|
    if k.downcase == "sd-connection-string"
      k = "SD-Connection-String" 
    end
    buf << "#{k}: #{v}\r\n"
  end
  buf << "\r\n"
  #puts "WRITING..."
  #puts buf
  sock.write buf
end