문제

Can Rest Client do NTLM authentication?

I didn't see any options in the documentation for authentication types:

require 'rest_client'

resource = RestClient::Resource.new 'http://website', :auth_type => 'ntlm', :user => 'USERNAME', :password => 'PASSWORD'
results = resource.get

:auth_type => 'ntlm' doesn't work, and I couldn't find anything on the documentation or IRC room either.

도움이 되었습니까?

해결책

The NTLM requirement really narrows down what HTTP software you can use due to it being so specific to Microsoft.

You might want to look at "NTLM Authentication for Ruby with Typhoeus and Curl", then look into using Typhoeus instead of rest-client.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top