The OpenD Programming Language

HttpMockProvider.populate

Convenience method to populate simple responses. For more complex work, use one of the other overloads where you build complete objects yourself.

class HttpMockProvider
void
populate
(
string request
,,
string response
)

Parameters

request string

a verb and complete URL to mock as one string. For example "GET http://example.com/". If you provide only a partial URL, it will be based on the baseUrl you gave in the HttpMockProvider constructor.

responseCode int

the HTTP response code, like 200 or 404.

response string

the response body as a string. It is assumed to be of the defaultResponseContentType you passed in the HttpMockProvider constructor.

Meta