WebSharper 4.7.2
This is a bugfix release for WebSharper 4.7.
Templates for .NET Core SDK: dotnet new -i WebSharper.Templates::4.7.2.423
Templates for Visual Studio 2017/2019: http://websharper.com/installers/WebSharper.4.7.2.423.vsix
Fixes
- #1126 Fixed an optimizer bug around object expressions that could drop property sets
- #1134 Added
Context.WithSettings
/Sitelets.WithSettings
helpers that add new environment vars for a Http Context or Sitelet. - #1135 Offline Sitelets projects now respect the WebSharperDownloadResources setting (downloading all remote js/css resources during compile time and linking them from local output). Also, other resources can be redirected with the
WithSettings
helper within WebsiteEntryPoint definition like so:Thanks to @btamas2000.override this.Sitelet = MySitelet |> Sitelet.WithSettings [ "WebSharper.JQuery.Resources.JQuery", "https://code.jquery.com/jquery-3.6.0.min.js" ]
- #1139 Synchronous http response writing hangup resolved in WebSharper.AspNetCore.
Known regression
-
#1141
Context.Request.BodyText
now throws an error when accessed in an ASP.NET Core web application. Synchronous access to request body will be deprecated. Use asynchronous request read fromContext.Request.Body
instead:async { use stream = new StreamReader(ctx.Request.Body) let! data = stream.ReadToEndAsync() |> Async.AwaitTask // ... process data }