Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. require 'httpclient'
  2. require 'pp'
  3. require 'kconv' #seemed to be needed due to a bug..
  4. require 'rubyntlm' # probably not needed directly?
  5.  
  6. domain = 'http://qvcluster1/'
  7. url = 'http://qvcluster1/default.htm'
  8. user = 'testuser'
  9. password = 'testpassword'
  10. client = HTTPClient.new
  11. client.set_auth(nil ,user,password)
  12. r = client.get("http://qvcluster1/default.htm")
  13. pp r
  14.  
  15. @reason_phrase="Unauthorized",
  16. @request_absolute_uri=nil,
  17. @request_method="GET",
  18. @request_query=nil,
  19. @request_uri=#<URI::HTTP http://qvcluster1/default.htm>,
  20. @status_code=401>,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement