Class: Motion::HTTP
- Inherits:
-
Object
show all
- Defined in:
- lib/common/http.rb,
lib/cocoa/adapter.rb,
lib/android/adapter.rb,
lib/common/http/client.rb,
lib/common/http/logger.rb,
lib/common/http/headers.rb,
lib/common/http/request.rb,
lib/common/http/response.rb
Defined Under Namespace
Classes: Adapter, Client, Headers, Logger, Request, Response
Class Attribute Summary collapse
Class Method Summary
collapse
-
.auth(header_value) ⇒ Object
-
.basic_auth(username, password) ⇒ Object
-
.client(*args) ⇒ Object
-
.delete(url, options = nil, &callback) ⇒ Object
-
.get(url, options = nil, &callback) ⇒ Object
-
.head(url, options = nil, &callback) ⇒ Object
-
.logger ⇒ Object
-
.options(url, options = nil, &callback) ⇒ Object
-
.patch(url, options = nil, &callback) ⇒ Object
-
.post(url, options = nil, &callback) ⇒ Object
-
.put(url, options = nil, &callback) ⇒ Object
-
.trace(url, options = nil, &callback) ⇒ Object
Class Attribute Details
.application_context ⇒ Object
4
5
6
|
# File 'lib/common/http.rb', line 4
def application_context
@application_context
end
|
Class Method Details
.auth(header_value) ⇒ Object
18
19
20
|
# File 'lib/common/http.rb', line 18
def auth()
client.auth()
end
|
.basic_auth(username, password) ⇒ Object
14
15
16
|
# File 'lib/common/http.rb', line 14
def basic_auth(username, password)
client.basic_auth(username, password)
end
|
.client(*args) ⇒ Object
10
11
12
|
# File 'lib/common/http.rb', line 10
def client(*args)
Client.new(*args)
end
|
.delete(url, options = nil, &callback) ⇒ Object
38
39
40
|
# File 'lib/common/http.rb', line 38
def delete(url, options = nil, &callback)
client.delete(url, options, &callback)
end
|
.get(url, options = nil, &callback) ⇒ Object
22
23
24
|
# File 'lib/common/http.rb', line 22
def get(url, options = nil, &callback)
client.get(url, options, &callback)
end
|
.head(url, options = nil, &callback) ⇒ Object
42
43
44
|
# File 'lib/common/http.rb', line 42
def head(url, options = nil, &callback)
client.head(url, options, &callback)
end
|
6
7
8
|
# File 'lib/common/http.rb', line 6
def logger
@logger ||= Logger.new
end
|
.options(url, options = nil, &callback) ⇒ Object
46
47
48
|
# File 'lib/common/http.rb', line 46
def options(url, options = nil, &callback)
client.options(url, options, &callback)
end
|
.patch(url, options = nil, &callback) ⇒ Object
34
35
36
|
# File 'lib/common/http.rb', line 34
def patch(url, options = nil, &callback)
client.patch(url, options, &callback)
end
|
.post(url, options = nil, &callback) ⇒ Object
26
27
28
|
# File 'lib/common/http.rb', line 26
def post(url, options = nil, &callback)
client.post(url, options, &callback)
end
|
.put(url, options = nil, &callback) ⇒ Object
30
31
32
|
# File 'lib/common/http.rb', line 30
def put(url, options = nil, &callback)
client.put(url, options, &callback)
end
|
.trace(url, options = nil, &callback) ⇒ Object
50
51
52
|
# File 'lib/common/http.rb', line 50
def trace(url, options = nil, &callback)
client.trace(url, options, &callback)
end
|