Releases: giraffe-fsharp/Giraffe
Releases · giraffe-fsharp/Giraffe
0.1.0-alpha018
- Added two new
HttpContext
extension methods:TryGetRequestHeader (key : string)
which returns anOption<string>
GetRequestHeader (key : string)
which returns aResult<string, string>
- Added default computation expressions for the
Option<'T>
andResult<'T, 'TError>
types underGiraffe.ComputationExpressions
0.1.0-alpha017
New features
- Added
plain/text
as a new supported mime type to the defaultnegotiate
handler (it will be using an object's.ToString()
method to serialize an object into plain text) - Added new helper functions for retrieving a logger or dependencies as extension methods of the
HttpContext
object:ctx.GetService<'T>()
andctx.GetLogger<'T>()
Breaking changes
- Completely removed the
HttpHandlerContext
type and replaced all usage with the originalHttpContext
object from ASP.NET Core. - Extended the
ErrorHandler
function with a parameter to retrieve a defaultILogger
object - Moved model binding functions from the
Giraffe.ModelBinding
module into theGiraffe.HttpContextExtensions
module and made them extension methods of theHttpContext
object
Also updated the giraffe-template
NuGet package with the latest changes.
0.1.0-alpha016
Fixes #46
0.1.0-alpha015
Changed the signature of the redirectTo
http handler (swapped permanent
with location
).
0.1.0-alpha014
Added redirectTo
http handler.
v0.1.0-alpha013
Using culture invariant converters in model binders.
0.1.0-alpha012
- Added
bindQueryString
which can automatically bind a model from query string parameters - Extended
bindModel
to includebindQueryString
when the HTTP method is notPOST
orPUT
0.1.0-alpha011
New features
- Added a
warbler
function - Added model binding capabilities which can automatically bind a HTTP payload to a strongly typed model:
bindJson
,bindXml
,bindForm
andbindModel
Improvements
- Improved the
negotiateWith
andnegotiate
http handlers by making use of ASP.NET Core'sMediaTypeHeaderValue
class - Added
*.cshtml
files to the DotNet watcher in the template
Bug fixes
- Fixed
AssemblyName
andPackageId
values in the template
0.1.0-alpha010
Added two new HttpHandler
functions:
negotiate
checks theAccept
header of a request and determines automatically if a response should be sent in JSON or XMLnegotiateWith
is the same asnegotiate
, but additionally accepts anIDictionary<string, obj -> HttpHandler>
which allows users to extend the default negotiation rules (e.g. change default serialization if a client is indifferent, or add more supported mime types, etc.)
0.1.0-alpha009
- Added a new programmatic view engine called
Giraffe.HtmlEngine
- Addd a new
HttpHandler
namedrenderHtml
to return views from the new view engine