example: oauth2 & /helloworld

This commit is contained in:
Stef Heyenrath
2017-05-24 23:45:36 +02:00
parent 8e32fd0be2
commit 5d6040df61

View File

@@ -36,6 +36,12 @@ namespace WireMock.Net.ConsoleApplication
.WithHeader("Content-Type", "application/json")
.WithBodyAsJson(new { access_token = "AT", refresh_token = "RT" }));
server
.Given(Request.Create().WithPath("/helloworld").UsingGet().WithHeader("Authorization", new RegexMatcher("^(?i)Bearer AT$")))
.RespondWith(Response.Create()
.WithStatusCode(200)
.WithBody("hi"));
server
.Given(Request.Create().WithPath(p => p.Contains("x")).UsingGet())
.AtPriority(4)