Replies: 5 comments 11 replies
-
Beta Was this translation helpful? Give feedback.
10 replies
-
What is the |
Beta Was this translation helpful? Give feedback.
1 reply
-
Final version option 2️⃣ server
.WhenRequest(r => r //⚡ The Request.Create() has been replaced by an Action
.WithPath("/mypath")
.UsingPost()
)
.DefineGuid("86984b0e-2516-4935-a2ef-b45bf4820d7d") //⚡ An extra method DefineGuid is added
.ThenRespondWith(r => r //⚡ The Response.Create() has been replaced by an Action
.WithHeader("Content-Type", "application/json")
.WithBodyAsJson("{{JsonPath.SelectToken request.body \"..name\"}}")
.WithTransformer()
.WithStatusCode(HttpStatusCode.Accepted)
); |
Beta Was this translation helpful? Give feedback.
0 replies
-
PR #1042 has been merged. A new version 1.6.0 will be released in some days |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'll close this discussion for now because it's implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently the C# code to build a request with a response is like:
I want to make this a bit easier to use.
1️⃣
My first proposal is like this:
2️⃣
Optionally, my second proposal could be to use
WhenRequest
, so:3️⃣
Optionally, option 3,
RespondWith
is replaced byRespond
:Also another change would be that in case you just want a simple 200 ok response, you can now use:
or
(#1042)
Beta Was this translation helpful? Give feedback.
All reactions