Releases: giraffe-fsharp/Giraffe
Releases · giraffe-fsharp/Giraffe
0.1.0-beta-510
Improvements
- Explicitly set the encoding to UTF-8 when reading the HTTP body during
ReadBodyFromRequestAsync
New features
- Added the
html
http handler which can be used to return atext/html
response by passing in the html content as a string variable
0.1.0-beta-500
New features
- Added a new overload for
GetLogger
of theHttpContext
extension methods, which allows one to pass in acategoryName
string in order to initialise a new logger:let logger = ctx.GetLogger "categoryName"
. BindFormAsync
,BindQueryString
andBindModelAsync
accept an additional optional parameter forCultureInfo
.
Breaking changes
- Removed
Giraffe.Tasks
from theGiraffe
NuGet package and added a new dependency on the newly createdGiraffe.Tasks
NuGet package. You can use theGiraffe.Tasks
NuGet package from non ASP.NET Core projects now as well.
0.1.0-beta-400
New features
- Added HTTP status code helper functions.
- Added
defaultSerializeJson
anddefaultDeserializeJson
methods. - Auto opened default Giraffe modules so that the core functionality can be entirely consumed through a single
open Giraffe
statement. - The functionality from
Giraffe.Razor.Middleware
andGiraffe.Razor.HttpHandlers
can be both consumed through a singleopen Giraffe.Razor
now.
Bug fixes
- Changed the
base
tag from theXmlViewEngine
from a regulartag
to avoidTag
to comply with the HTML spec.
Breaking changes
- Renamed all async methods by appending
Async
at the end of the method in order to comply with the general .NET naming conventionreadFileAsString
-->readFileAsStringAsync
ctx.ReadBodyFromRequest
-->ctx.ReadBodyFromRequestAsync
ctx.BindJson
-->ctx.BindJsonAsync
ctx.BindXml
-->ctx.BindXmlAsync
ctx.BindForm
-->ctx.BindFormAsync
ctx.BindModel
-->ctx.BindModelAsync
ctx.WriteJson
-->ctx.WriteJsonAsync
ctx.WriteXml
-->ctx.WriteXmlAsync
ctx.WriteText
-->ctx.WriteTextAsync
ctx.RenderHtml
-->ctx.RenderHtmlAsync
ctx.ReturnHtmlFile
-->ctx.ReturnHtmlFileAsync
- Renamed
Giraffe.DotLiquid.HttpHandlers
module toGiraffe.DotLiquid
0.1.0-beta-310
New features
- Added
portRoute
http handler to filter an incoming request based on the port
Breaking changes
- The
GET
,POST
,PUT
andDELETE
http handlers of theTokenRouter.fs
have changed to accept a list of http handlers now.
Bug fixes
- TokenRouter fringe case not being identified before (see #150)
0.1.0-beta-300
New features
- Added
requiresAuthPolicy
http handler - Added
RenderHtml
andReturnHtmlFile
extension methods to theHttpContext
object - Added
customJson
http handler, which allows users to define a custom json handler (with custom serialization settings) - Added overloads to
BindJson
andBindModel
where a user can pass in a customJsonSerializerSettings
object
Breaking changes
- Changed the default json serializer to use camel case for serialization (this change prevents users from being able to change the default serializer through the
JsonConvert.DefaultSettings
object - usecustomJson
instead if customization is required) - Changed the
serializeJson
,deserializeJson
methods to accept an aditional parameter of typeJsonSerializerSettings
Bug fixes and improvements
- Automatically URL decoding of string values when using
routef
- Fixed an inference bug with
routef
by replacing theformat
parameter of thetryMatchInput
method and thepath
parameter of theroutef
androuteCif
methods fromStringFormat
toPrintFormat
- Changed the implementation of
ctx.BindJson<'T>()
for better performance and which aims to fix an Azure bug with Kestrel (#136) - Fixed a bug with
routeBind
(#129) - Improved the
htmlFile
http handler by allowing thefilePath
parameter to be either rooted or relative to theContentRootPath
0.1.0-beta-200
- Added three additional
HttpContext
extension methods in theGiraffe.HttpContextExtensions
module:WriteJson
,WriteXml
andWriteText
. These three methods can be used for direct HttpReponse writing from within a custom handler without having to sub-call thejson
,xml
ortext
http handlers. - Changed the
UseGiraffeErrorHandler
method to return anIApplicationBuilder
now. This change allows middleware chaining. This is a breaking change and you'll either have to chain middleware or append an|> ignore
in your application set up.
0.1.0-beta-110
Added the Giraffe.TokenRouter
module for speed improved route handling.
0.1.0-beta-102
Improved the routeBind
http handler to give users more flexibility in mapping routes to HTTP requests (see #110).
0.1.0-beta-101
- Fixed bug in connection with the
ExceptionHandlerMiddleware
(see #106) - Added CORS settings for localhost to the default giraffe-template
0.1.0-beta-100
Updated Giraffe to .NET Standard 2.0
Attention, this release updated all Giraffe NuGet packages to net461
and netstandard2.0
!
You will have to upgrade your ASP.NET Core application to either full .NET framework 461 or to a .NET Core app 2.0.
There were a few minor breaking changes in ASP.NET Core 2.0 which also affected Giraffe. I do not intend to keep maintaining a 1.x version any longer unless there's a very compelling reason. General advice is to upgrade all .NET Core web applications to 2.0.