Updating README.md after changes

Signed-off-by: Tobias Lønnerød Madsen <m@dsen.tv>
This commit is contained in:
Tobias Lønnerød Madsen 2019-11-07 08:38:57 +01:00
parent aa78505be6
commit 135f1f2e7c
No known key found for this signature in database
GPG Key ID: E51953EA8372F2AC
1 changed files with 3 additions and 3 deletions

View File

@ -215,13 +215,13 @@ context.Response.StatusCode = (int)HttpStatusCode.OK;
### HTTP - Microsoft.AspNetCore.Http.HttpRequest ### HTTP - Microsoft.AspNetCore.Http.HttpRequest
On the server-side, you can extract a CloudEvent from the server-side `HttpRequest` On the server-side, you can extract a CloudEvent from the server-side `HttpRequest`
with the `ToCloudEvent()` extension. with the `ReadCloudEventAsync()` extension.
```C# ```C#
var cloudEvent = HttpContext.Request.ToCloudEvent(); var cloudEvent = await HttpContext.Request.ReadCloudEventAsync();
``` ```
### HTTP - ASP.Net Core MVC ### HTTP - ASP.NET Core MVC
If you would like to deserialize CloudEvents in actions directly, you can register the If you would like to deserialize CloudEvents in actions directly, you can register the
`CloudEventInputFormatter` in the MVC options: `CloudEventInputFormatter` in the MVC options: