Class: Tina4::TestClient
- Inherits:
-
Object
- Object
- Tina4::TestClient
- Defined in:
- lib/tina4/test_client.rb
Instance Method Summary collapse
-
#delete(path, headers: nil) ⇒ Object
Send a DELETE request.
-
#get(path, headers: nil) ⇒ Object
Send a GET request.
-
#patch(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a PATCH request.
-
#post(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a POST request.
-
#put(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a PUT request.
Instance Method Details
#delete(path, headers: nil) ⇒ Object
Send a DELETE request.
69 70 71 |
# File 'lib/tina4/test_client.rb', line 69 def delete(path, headers: nil) request("DELETE", path, headers: headers) end |
#get(path, headers: nil) ⇒ Object
Send a GET request.
49 50 51 |
# File 'lib/tina4/test_client.rb', line 49 def get(path, headers: nil) request("GET", path, headers: headers) end |
#patch(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a PATCH request.
64 65 66 |
# File 'lib/tina4/test_client.rb', line 64 def patch(path, json: nil, body: nil, headers: nil) request("PATCH", path, json: json, body: body, headers: headers) end |
#post(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a POST request.
54 55 56 |
# File 'lib/tina4/test_client.rb', line 54 def post(path, json: nil, body: nil, headers: nil) request("POST", path, json: json, body: body, headers: headers) end |
#put(path, json: nil, body: nil, headers: nil) ⇒ Object
Send a PUT request.
59 60 61 |
# File 'lib/tina4/test_client.rb', line 59 def put(path, json: nil, body: nil, headers: nil) request("PUT", path, json: json, body: body, headers: headers) end |