All URIs are relative to http://localhost:1080
Method | HTTP request | Description |
---|---|---|
bind_put | PUT /bind | bind additional listening ports |
clear_put | PUT /clear | clears expectations and recorded requests that match the request matcher |
reset_put | PUT /reset | clears all expectations and recorded requests |
retrieve_put | PUT /retrieve | retrieve recorded requests, active expectations, recorded expectations or log messages |
status_put | PUT /status | return listening ports |
stop_put | PUT /stop | stop running process |
Ports bind_put(ports)
bind additional listening ports
only supported on Netty version
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
ports = MockServer::Ports.new # Ports | list of ports to bind to, where 0 indicates dynamically bind to any available port
begin
#bind additional listening ports
result = api_instance.bind_put(ports)
p result
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->bind_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
ports | Ports | list of ports to bind to, where 0 indicates dynamically bind to any available port |
No authorization required
- Content-Type: application/json
- Accept: application/json
clear_put(opts)
clears expectations and recorded requests that match the request matcher
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
opts = {
http_request: MockServer::HttpRequest.new # HttpRequest | request used to match expectations and recored requests to clear
}
begin
#clears expectations and recorded requests that match the request matcher
api_instance.clear_put(opts)
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->clear_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
http_request | HttpRequest | request used to match expectations and recored requests to clear | [optional] |
nil (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
reset_put
clears all expectations and recorded requests
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
begin
#clears all expectations and recorded requests
api_instance.reset_put
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->reset_put: #{e}"
end
This endpoint does not need any parameter.
nil (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Object retrieve_put(opts)
retrieve recorded requests, active expectations, recorded expectations or log messages
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
opts = {
format: 'format_example', # String | changes response format, default if not specificed is \"json\", supported values are \"java\", \"json\"
type: 'type_example', # String | specifies the type of object that is retrieve, default if not specified is \"requests\", supported values are \"logs\", \"requests\", \"recorded_expectations\", \"active_expectations\"
http_request: MockServer::HttpRequest.new # HttpRequest | request used to match which recorded requests, expectations or log messages to return, an empty body matches all requests, expectations or log messages
}
begin
#retrieve recorded requests, active expectations, recorded expectations or log messages
result = api_instance.retrieve_put(opts)
p result
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->retrieve_put: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
format | String | changes response format, default if not specificed is "json", supported values are "java", "json" | [optional] |
type | String | specifies the type of object that is retrieve, default if not specified is "requests", supported values are "logs", "requests", "recorded_expectations", "active_expectations" | [optional] |
http_request | HttpRequest | request used to match which recorded requests, expectations or log messages to return, an empty body matches all requests, expectations or log messages | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json, application/java, text/plain
Ports status_put
return listening ports
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
begin
#return listening ports
result = api_instance.status_put
p result
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->status_put: #{e}"
end
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
stop_put
stop running process
only supported on Netty version
# load the gem
require 'mockserver-client'
api_instance = MockServer::ControlApi.new
begin
#stop running process
api_instance.stop_put
rescue MockServer::ApiError => e
puts "Exception when calling ControlApi->stop_put: #{e}"
end
This endpoint does not need any parameter.
nil (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined