Class: AFHTTPClient
- Inherits:
-
Object
- Object
- AFHTTPClient
- Defined in:
- lib/afmotion/http_client.rb
Instance Method Summary collapse
-
#authorization=(options = {}) ⇒ Object
options can be - _, password: __ or - {token: _ }.
- #multipart ⇒ Object
Instance Method Details
#authorization=(options = {}) ⇒ Object
options can be
-
_, password: __
or
-
{token: _ }
153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/afmotion/http_client.rb', line 153 def ( = {}) if .nil? clearAuthorizationHeader elsif [:username] && [:password] setAuthorizationHeaderWithUsername([:username], password: [:password]) elsif [:token] setAuthorizationHeaderWithToken([:token]) else raise "Not a valid authorization hash: #{.inspect}" end end |
#multipart ⇒ Object
144 145 146 147 |
# File 'lib/afmotion/http_client.rb', line 144 def multipart @multipart = true self end |