Bolero 0.8
Pre-release.NET Core version requirement
- Updated Blazor and .NET Core dependencies to version 3.0-preview8, with associated API changes.
Breaking changes
-
#73 Removed the server-side module
Bolero.Remoting.Server.Remote
with its functionswithHttpContext
,authorize
andauthorizeWith
.Instead, a new type
IRemoteContext
is provided via dependency injection:type IRemoteContext = inherit IHttpContextAccessor // member HttpContext : HttpContext with get, set member Authorize : ('req -> Async<'resp>) -> ('req -> Async<'resp>) member AuthorizeWith : seq<IAuthorizeData> -> ('req -> Async<'resp>) -> ('req -> Async<'resp>)
There are also new overloads on
IServiceCollection.AddRemoting
that takeIRemoteContext -> 'Handler
as argument, so that remote handlers that use authorization don't need to switch to using DI.
New features
-
#61 Add
attr.key
to uniquely identify elements in a list to help the renderer. See the corresponding @key attribute in the Blazor documentation. -
#70 Correctly provide the
HttpContext
to remote functions when running in server mode. -
#71 Add new exception
RemoteException of HttpResponseMessage
, which is thrown on the client side when the response code is neither 200 OK (which succeeds) nor 401 Unauthorized (which throwsRemoteUnauthorizedException
).