lib/knj/http2.rb in knjrbfw-0.0.42 vs lib/knj/http2.rb in knjrbfw-0.0.43
- old
+ new
@@ -210,9 +210,13 @@
headers["Accept-Encoding"] = "gzip"
else
#headers["Accept-Encoding"] = "none"
end
+ if @args[:basic_auth]
+ headers["Authorization"] = "Basic #{Base64.encode64("#{@args[:basic_auth][:user]}:#{@args[:basic_auth][:passwd]}")}"
+ end
+
return headers
end
#This is used to convert a hash to valid post-data recursivly.
def self.post_convert_data(pdata, args = nil)
\ No newline at end of file