mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-23 00:38:28 +02:00
Updated Admin API Reference (markdown)
@@ -25,6 +25,25 @@ api.Authorization = new AuthenticationHeaderValue("Bearer", "eyJ0eXAiOiJKV1QiLCJ
|
|||||||
var settings = await api.GetSettingsAsync();
|
var settings = await api.GetSettingsAsync();
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### FluentBuilder
|
||||||
|
All Admin API Model classes are annotated with [FluentBuilder](https://github.com/StefH/FluentBuilder) which makes it easy to build a mapping in a fluent way.
|
||||||
|
|
||||||
|
Example code:
|
||||||
|
``` c#
|
||||||
|
var mappingBuilder = api.GetMappingBuilder();
|
||||||
|
mappingBuilder.Given(m => m
|
||||||
|
.WithTitle("This is my title 1")
|
||||||
|
.WithRequest(req => req
|
||||||
|
.UsingGet()
|
||||||
|
.WithPath("/bla1")
|
||||||
|
)
|
||||||
|
.WithResponse(rsp => rsp
|
||||||
|
.WithBody("x1")
|
||||||
|
.WithHeaders(h => h.Add("h1", "v1"))
|
||||||
|
)
|
||||||
|
);
|
||||||
|
```
|
||||||
|
|
||||||
## Supported interfaces
|
## Supported interfaces
|
||||||
The following interfaces are supported:
|
The following interfaces are supported:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user