Class: Saml::Kit::DefaultRegistry::HttpApi
- Inherits:
-
Object
- Object
- Saml::Kit::DefaultRegistry::HttpApi
- Defined in:
- lib/saml/kit/default_registry.rb
Instance Attribute Summary collapse
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
-
#verify_ssl ⇒ Object
readonly
Returns the value of attribute verify_ssl.
Instance Method Summary collapse
- #execute(request) ⇒ Object
- #get ⇒ Object
-
#initialize(url, verify_ssl: true) ⇒ HttpApi
constructor
A new instance of HttpApi.
Constructor Details
#initialize(url, verify_ssl: true) ⇒ HttpApi
Returns a new instance of HttpApi.
25 26 27 28 |
# File 'lib/saml/kit/default_registry.rb', line 25 def initialize(url, verify_ssl: true) @uri = URI.parse(url) @verify_ssl = verify_ssl end |
Instance Attribute Details
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
23 24 25 |
# File 'lib/saml/kit/default_registry.rb', line 23 def uri @uri end |
#verify_ssl ⇒ Object (readonly)
Returns the value of attribute verify_ssl.
23 24 25 |
# File 'lib/saml/kit/default_registry.rb', line 23 def verify_ssl @verify_ssl end |
Instance Method Details
#execute(request) ⇒ Object
34 35 36 |
# File 'lib/saml/kit/default_registry.rb', line 34 def execute(request) http.request(request) end |
#get ⇒ Object
30 31 32 |
# File 'lib/saml/kit/default_registry.rb', line 30 def get execute(Net::HTTP::Get.new(uri.request_uri)).body end |