class MockServerClient::Client

Defined in:

mockserver-client.cr

Constant Summary

SAFE_STATUS_CODE = [406] + (200..299).to_a

Calls to mock server are "successful" with these response codes

Constructors

Instance Method Summary

Constructor Detail

def self.new(mockserver_url : String = "localhost", port : Int32 = 1080) #

[View source]

Instance Method Detail

def bind(port : Int32 | Array(Int32)) #

[View source]
def clear(id : String) #

[View source]
def clear(request : HttpRequest) #

[View source]
def expectation(expectation : Expectation) #

[View source]
def expectation(**kwargs) #

[View source]
def forward(**kwargs) #

[View source]
def request(**kwargs) #

[View source]
def reset #

[View source]
def response(**kwargs) #

[View source]
def retrieve(type : String = "requests", body = nil) #

[View source]
def retrieve_active_expectations(exp : Expectation | Nil = nil) #

[View source]
def retrieve_logs #

[View source]
def retrieve_request_responses(exp : Expectation | Nil = nil) #

[View source]
def retrieve_requests(exp : Expectation | Nil = nil) #

[View source]
def retrievie_recorded_expectations(exp : Expectation | Nil = nil) #

[View source]
def status #

[View source]
def verify(expectation : Expectation | ExpectationId | HttpRequest | String, **kwargs) #

[View source]
def verify_sequence(sequence : Array(HttpRequest) | Array(Expectation)) #

[View source]