Class: Tina4::TestClient

Inherits:
Object
  • Object
show all
Defined in:
lib/tina4/test_client.rb

Instance Method Summary collapse

Instance Method Details

#delete(path, headers: nil) ⇒ Object

Send a DELETE request.



71
72
73
# File 'lib/tina4/test_client.rb', line 71

def delete(path, headers: nil)
  request("DELETE", path, headers: headers)
end

#get(path, headers: nil) ⇒ Object

Send a GET request.



51
52
53
# File 'lib/tina4/test_client.rb', line 51

def get(path, headers: nil)
  request("GET", path, headers: headers)
end

#patch(path, json: nil, body: nil, headers: nil) ⇒ Object

Send a PATCH request.



66
67
68
# File 'lib/tina4/test_client.rb', line 66

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.



56
57
58
# File 'lib/tina4/test_client.rb', line 56

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.



61
62
63
# File 'lib/tina4/test_client.rb', line 61

def put(path, json: nil, body: nil, headers: nil)
  request("PUT", path, json: json, body: body, headers: headers)
end