lhs icon indicating copy to clipboard operation
lhs copied to clipboard

Sub-ressource does not apply auth options with load!

Open nethad opened this issue 7 years ago • 1 comments

Example:

=> <IS::Place{:href=>"http://datastore/v2/places/123"}>
[11] pry(main)> sub_ressource_place.load!
ETHON: performed EASY effective_url=http://datastore/v2/places/123 response_code=401 return_code=ok total_time=0.015113
LHC::Unauthorized: get http://datastore/v2/places/123
Params: {:url=>"http://datastore/v2/places/123", :method=>:get}
Headers: {"User-Agent"=>"Typhoeus - https://github.com/typhoeus/typhoeus"}
Response Code: 401
{"error":"unauthorized","error_description":"An Authentication object was not found in the SecurityContext"}
LHC::Unauthorized
from /usr/local/var/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/lhc-3.5.5/lib/lhc/request.rb:105:in `throw_error'

nethad avatar Jul 28 '16 15:07 nethad

Actually load! is not the problem as it should already take the options from Record's endpoint: https://github.com/local-ch/lhs/pull/145/files

10xSebastian avatar Jul 29 '16 05:07 10xSebastian