All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- feat: add routeBind support to Giraffe.EndpointRouting - Credits @AugustoRengel
- Add KeepAChangelog - Credits @64J0
- Add .NET 10 to the list of test TFMs and update CI - Credits @64J0
- docs: fix named parameters docs for endpoint routing - Credits @AugustoRengel
- [DOCS] Update code examples that deal with ASP.NET host configuration - Credits @64J0
- Add issue templates - Credits @64J0
- Add GitHub dependabot configuration - Credits @64J0
- Add global rate limiting sample - Credits @64J0
- Add OpenApi section to the documentation - Credits @64J0
- Add AssemblyVersion attribute - Credits @64J0
- Add more links - Credits @64J0
- Add .NET 9 as target framework, fine-tune dependabot, update CI and clean tests removing .NET 6/7 from target frameworks - Credits @64J0
- [Alpha] Add Endpoint routing functions ...WithExtensions - Credits @64J0
- Could we avoid allocation of UTF8 byte array? - Credits @Thorium
- Update fsharp-analyzers and the analyzer packages - Credits @Numpsy
- Improve JSON docs - Credits @64J0
- Enhance routef support for named parameters and improve documentation - Credits @RJSonnenberg
- Fix assembly version
- Remove [<AllowNullLiteral>] attribute from Json.ISerializer and Xml.ISerializer - Credits @64J0
- Remove Obsolete from redirectTo - Credits @kerams
- Some security fixes for Giraffe - Credits @
- Code scanning fix patches - Credits @64J0
- Remove Obsolete from redirectTo - Credits @kerams
- Could we avoid allocation of UTF8 byte array? - Credits @Thorium
- Some security fixes for Giraffe - Credits @Thorium
- Add issue templates - Credits @64J0
- Update fsharp-analyzers and the analyzer packages - Credits @Numpsy
- Improve JSON docs - Credits @64J0
- Enhance routef support for named parameters and improve documentation - Credits @RJSonnenberg
- Add GitHub dependabot configuration - Credits @64J0
- Add global rate limiting sample - Credits @64J0
- Add OpenApi section to the documentation - Credits @64J0
- Add AssemblyVersion attribute - Credits @64J0
- Add more links - Credits @64J0
- Add .NET 9 as target framework, fine-tune dependabot, update CI and clean tests removing .NET 6/7 from target frameworks - Credits @64J0
- [Alpha] Add Endpoint routing functions ...WithExtensions - Credits @64J0
- Code scanning fix patches - Credits @64J0
- Combination of the tags:
- Add maintainers info - Credits @nojaf
- Fix ReadBodyFromRequestAsync disposing ctx.Request.Body - Credits @64J0
- Moar fantomas - Credits @nojaf
- HandleOptionGracefullyAnalyzer for ETag and Last-Modified at Preconditional.fs - Credits @64J0
- feat: add request limits on accept, content-type, and content-length headers - Credits @stijnmoreels
- Add F# Analyzers - Credits @1eyewonder
- Add F# compatible json serializer - Credits @fpellet
- Update .vscode samples debug configuration - Credits @64J0
- Combination of the tags:
- Add ability to Configure Endpoints via IEndpointConventionBuilder - Credits @mrtz-j
- Promote System.Text.Json as default JSON serializer - Credits @esbenbjerre
- Improve DEVGUIDE with SemVer pre-release observation - Credits @64J0
- Fix pre-release/release workflows - Credits @64J0
- Hotfix pre-release workflow - Credits @64J0
- Update README.md giraffe-template installation command - Credits @dbrattli
- Change dev instructions and CI - Credits @64J0
- Fix EndpointRouting Guid regex + tests - Credits @64J0
- Add Fantomas validation to CI - Credits @64J0
- Upgrade to .NET 8 - Credits @Banashek @fpellet
- Improve CI by updating actions version and avoid concurrent jobs for the same PR - Credits @64J0
- Upgrade to .NET 8 - Credits @Banashek @fpellet
- Same as 6.3.0-alpha-1
- Add explicitly the statement that the usage of Giraffe.EndpointRouting is recommended - Credits @64J0
- Add an example app using the cache features - Credits @64J0
- Add GetWebHostEnvironment function and add deprecation warning to GetHostingEnvironment - Credits @64J0
- No need to build so many Regex - Credits @Thorium
- Minor code optimisation - Credits @Thorium
- Fix requiresAuthentication for null user identity - Credits @rslopes
- Change sample EndpointRoutingApp level - Credits @64J0
- remove Utf8Json support - Credits @jcmrva
- Updating github workflow file to use nuget-acceptable version numbers for packaging - Credits @Banashek
- Updating mimetype accept header parsing to use builtin aspnet parse/methods - Credits @Banashek
- Make recyclableMemoryStreamManager internal - Credits @kerams
- Upgrade to .NET 7 - Credits @epoyraz
- Documentation: Add another tutorial video to README - Credits @SIRHAMY
- RFC-compliant Content-Length handling for 1xx, 204 and 205 responses and CONNECT requests - Credits @retendo
- Restore 6.0 as TFM - Credits @TheAngryByrd
- Fixed Slack invite link - Credits @anpin
- Fix spelling in docs for BindJsonAsync and BindXmlAsync - Credits @onpikono
- Same as 6.0.0-alpha-2
- Added
setContentTypehandler
- Made the
RecyclableMemoryStreamManagerconfigurable through DI - Improved
Xml.Serializerto also make use of theRecyclableMemoryStreamManager
- Upgraded to .NET 6 and F#'s new native
taskcomputation expression.
- Stable release of latest 5.0.0 RC with additional XML comment fixes to comply with latest F# compiler services.
- Updated
Plyfrom0.1.*to0.3.*.
- Replaced
TaskBuilder.fswithPlyfor Giraffe'staskcomputation expressions (see #421). Ply is being actively developed by Crowded and has better exception stack traces for task computations and several performance improvements over TaskBuilder.fs.
- Added an overload for
UseGiraffeto pass in anEndpoint list.
- Fixed bug when a
NestedEndpointpreceded aMultiEndpointinGiraffe.EndpointRouting(see #452)
- Removed the sub-module
GiraffeMiddlewarefrom theGiraffe.EndpointRoutingmodule (simply keep using theUseGiraffeextension method of anIApplicationBuilder)
- Added
ReadBodyBufferedFromRequestAsyncextension method to buffer and read a the request body and make subsequent reads possible (see #449) - Added
GET_HEADto the endpoint routing functions, which will handle aHEADrequest for the sameGEThandler.
- Changed how the serialization modules are structured:
IJsonSerializeris nowJson.ISerializerUtf8JsonSerializeris nowUtf8Json.SerializerNewtonsoftJsonSerializeris nowNewtonsoftJson.SerializerSystemTextJsonSerializeris nowSystemTextJson.SerializerIXmlSerializeris nowXml.ISerializerDefaultXmlSerializeris nowSystemXml.Serializer
- Converted all
HttpContextextension methods into C# compatible extension methods, meaning that function arguments had to be merged into tuples - Changed the
GET,POST,PUT,HEAD, etc. functions to accept anEndpoint listinstead of anEndpoint- Before:
GET => route "/foo" (text "bar"), After:GET [ route "/foo" (text "bar") ]
- Before:
- Removed the
=>operator fromGiraffe.EndpointRouting
- Added
routexphttp handler to default router (see #446)
- Fixed pre-conditions validation issue (see #424)
- Fixed parsing issue with Guids and ShortIds in
Giraffe.EndpointRouting(see #447)
- Upgraded to .NET 5. The 5.x version of Giraffe is targeting
net5.0and dropping support for all other target frameworks. - Only supported target framework is .NET 5
- Added
Giraffe.EndpointRoutingnamespace with a version of a few routing handlers which integrate with ASP.NET Core's endpoint routing API- Currently supported are:
route,routef,subRouteand HTTP verb handlers such asGET,POST,PUT, etc. - Check the Endpoint Routing documentation for more details
- Or check the
EndpointRoutingAppsample app for how to useGiraffe.EndpointRouting
- Currently supported are:
- Replaced
Giraffe.GiraffeViewEnginewith the standalone NuGet packageGiraffe.ViewEngine - New
JsonOnlyNegotiationConfigfor setting a content negotiation policy which only supports JSON serialisation (no XML for those who don't need it) - Added
SystemTextJsonSerializerwhich usesSystem.Text.Jsonfor JSON serialisation when configured as the desired JSON serializer in Giraffe - Improved RegEx http handlers in original (non Endpoint routing) http handlers
- Swapped Markdown docs for XML docs for all functions.
- Added support for complex model binding (see #416)
- Enhanced Endpoint routing with a metadata list (see PR #437)
- Added dependency to new
Giraffe.ViewEnginepackage and re-introduced thehtmlViewandWriteHtmlViewAsyncfunctions into Giraffe. - Added support for complex model binding (see #416)
- Swapped Markdown docs for XML docs for all functions.
- Improved endpoint routing by deferring the creation of
RequestDelegatefunctions.
- Added
System.Text.Jsonserializer - Added
Giraffe.EndpointRoutingnamespace with a super early alpha version of new routing handlers which integrate with ASP.NET Core's endpoint routing API (check out theEndpointRoutingAppsample app for examples before the documentation is ready) - Added
SystemTextJsonSerializerwhich usesSystem.Text.Jsonfor JSON serialisation when configured as the desired JSON serializer in Giraffe - New
JsonOnlyNegotiationConfigfor setting a content negotiation which only supports JSON serialisation and not XML
- Only supported target framework is .NET Core 3.1 (in preparation for .NET 5)
- Improved RegEx http handlers in original (non Endpoint routing) http handlers
- Removed
Giraffe.GiraffeViewEngine(in preparation to distribute it as a separate NuGet package, which doesn't exist yet). This release has noGiraffeViewEnginewhich is one of the reasons why it's analpha-001release. Plans are to bring it back in5.0.0-alpha-002
- Added
netcoreapp3.1support
- Removed redundant dependencies
- Fixed model binding for arrays (see #403)
- Fixed pre-condition bug for the
If-Unmodified-SinceHTTP header (see #402)
- Fixed dependency references for TFM
netcoreapp3.0projects.
- Support for array of
'Tas a child in form binding. - Added a new
DateTimeextension methodToIsoStringwhich produces a RFC3339 formatted string, and corrected the docs on the existingToHtmlStringextension method which actually produces a RFC822 formatted string. - Added new version of
tryMatchInputwhich acceptsMatchSettingsrecord.
- Giraffe 4.0.0 has been tested against
netcoreapp3.0alongsidenetcoreapp2.1andnet461. All sample code has been upgraded to .NET Core 3.0 as well. - Changed minimum version of
Newtonsoft.Jsonto11.0.2. This allows Giraffe to be compatible with Azure Functions. - Renamed
tryMatchInputtotryMatchInputExactand swapped the order of arguments so that the string value comes last.
- Fixed
routefto not match more than one URL path segment (see issue #347):- Before: route
/foo/bar/%smatched/foo/bar/hello/world - After: route
/foo/bar/%sdoes not match/foo/bar/hello/world
- Before: route
- Fixed the
_ariaLabelledByattribute in theGiraffeViewEngine - Fixed case insensitive route handlers on Ubuntu
- Fixed a bug in the
subRouteCihttp handler, which prevented nested sub routes to be case insensitive.
- Added two new
HttpContextextension methods to retrieve cookie and form values:GetCookieValue (key : string)GetFormValue (key : string)
- Fixed a bug in Giraffe's model binding to not try to set read only properties anymore.
- Updated all packages and framework library dependencies to .NET Core 2.2.
- Added a new
GET_HEADhttp handler (see: #314 for more info). - Added a new convenience function called
handleContext, which can be used for creating newHttpHandlerfunctions.
- Fixed the
_dataattribute in theGiraffeViewEngineto accept akeyandvalueparameter now.
- Added a new http handler called
authorizeRequestto authorize a request based on aHttpContext -> boolpredicate. - Added a new http handler called
authorizeUserwhich is an alias forevaluateUserPolicy. TheevaluateUserPolicyhandler will be removed in the next major release.
- Added
stras an alias for theencodedTextfunction from theGiraffeViewEngine. - Added the
HttpContext.GetRequestUrl()extension method to retrieve the entire URL string of the incoming HTTP request.
- Adding the
charsetparameter in the HTTPContent-Typeresponse header when returning a text response (text/plain, text/html) or a JSON or XML response (application/json, application/xml). By default Giraffe is using UTF8 encoding for all its responses.
- Added a new http handler called
validatePreconditionsto help with conditional requests. - Made previously internal functionality for sub routing available through the
SubRoutingmodule:SubRouting.getSavedPartialPath: Returns the currently partially resolved path.SubRouting.getNextPartOfPath: Returns the yet unresolved part of the path.SubRouting.routeWithPartialPath: Invokes a route handler as part of a sub route.
- Performance improvements for Giraffe's default response writers.
- Performance improvements of the
htmlViewhandler. - Upgraded to the latest
TaskBuilder.fsNuGet package which also has the SourceLink integration now.
- Fixed the
Successful.NO_CONTENThttp handler, which threw an exception when calling from ASP.NET Core 2.1.
- Changed the type
XmlNodeby removing theRawTextandEncodedTextunion case and replaced both by a singleTextunion case. The HTML encoding (or not) is being done now when calling one of the two helper functionsrawTextandencodedText.- This change - even though theoretically a breaking change - should not affect the vast majority of Giraffe users unless you were constructing your own
XmlNodeelements which were of typeRawTextorEncodedText(which is extremely unlikely given that there's not much room for more nodes of these two types).
- This change - even though theoretically a breaking change - should not affect the vast majority of Giraffe users unless you were constructing your own
- Changed the members of the
IJsonSerializerinterface to accommodate new (de-)serialize methods for chunked encoding transfer. - Significant performance improvements in the
GiraffeViewEngineby changing the underlying composition of views from simple string concatenation to using aStringBuilderobject.
- Removed the
task {}override in Giraffe which was forcing theFSharp.Control.Tasks.V2.ContextInsensitiveversion of the Task CE. This change has no effect on the behaviour oftaskcomputation expressions in Giraffe. In the context of an ASP.NET Core web application there is not difference betweenContextSensitiveandContextInsensitivewhich is why the override has been removed. The only breaking change which could affect an existing Giraffe web application is that in some places you will need to explicitlyopen FSharp.Control.Tasks.V2.ContextInsensitivewhere before it might have been sufficient to onlyopen Giraffe.
- Support for short GUIDs and short IDs (aka YouTube IDs) in route arguments and query string parameters.
- Enabled SourceLink support for Giraffe source code (thanks Cameron Taggart)! For more information check out Adding SourceLink to your .NET Core Library.
- Added a new JSON serializer called
Utf8JsonSerializer. This type uses the Utf8 JSON serializer library, which is currently the fastest JSON serializer for .NET.NewtonsoftJsonSerializeris still the default JSON serializer in Giraffe (for stability and backwards compatibility), butUtf8JsonSerializercan be swapped in via ASP.NET Core's dependency injection API. The newUtf8JsonnSerializeris significantly faster (especially when sending chunked responses) thanNewtonsoftJsonSerializer. - Added a new
HttpContextextension method for chunked JSON transfers:WriteJsonChunkedAsync<'T> (dataObj : 'T). This newHttpContextmethod can write content directly to the HTTP response stream without buffering into a byte array first (see Writing JSON). - Added a new
jsonChunkedhttp handler. This handler is the equivalent http handler version of theWriteJsonChunkedAsyncextension method. - Added first class support for ASP.NET Core's response caching feature.
- Special thanks to Dmitry Kushnir for doing the bulk work of all the perf improvements in this release as well as adding Giraffe to the TechEmpower Webframework Benchmarks!
- Changed the
task {}CE to load fromFSharp.Control.Tasks.V2.ContextInsensitiveinstead ofFSharp.Control.Tasks.ContextInsensitive.
- Changed the name of the handler
requiresAuthPolicytoevaluateUserPolicyin order to better describe its functionality and to avoid a name clash between two newly added handlers for validating ASP.NET Core'sAuthorizationPolicyobjects (see new features). - Changed how he
AddGiraffe()extension method registers Giraffe dependencies in ASP.NET Core. It now follows theTryAddpattern which will only register a dependency if it hasn't been registered beforehand. - Changed the
HttpContext.GetService<'T>()extension method to throw aMissingDependencyExceptionif it cannot resolve a desired dependency.
- Added two new http handlers to validate an ASP.NET Core
AuthorizationPolicy(see: Policy based authorization). TheauthorizeByPolicyNameandauthorizeByPolicyhttp handlers will use ASP.NET Core's authorization service to validate a user against a given policy. - Updated
TaskBuilder.fsto version2.0.*. - Updated ASP.NET Core NuGet packages to latest
2.1.*versions. - Enabled
return!foropt { }computation expressions. - Added
blockquote,_integrityand_scopedto theGiraffeViewEngine. - Added attributes for mouse, keyboard, touch, drag & drop, focus, input and mouse wheel events to the
GiraffeViewEngine. - Added new accessibility attributes to the
GiraffeViewEngine. These can be used after opening theGiraffe.GiraffeViewEngine.Accessibilitymodule. - Added a new
Successful.NO_CONTENThttp handler which can be used to return a HTTP 204 response. - Added more structured logging around the Giraffe middleware.
- Fixed a bug in
routef,routeCifandsubRoutefwhich prohibited to parse multiple GUIDs - Fixed a bug in
routef,routeCifandsubRoutefwhich wrongly decoded a route argument twice (and therefore turned+signs into spaces). - Fixed XML documentation for all Giraffe functions which should make function tooltips nicely formatted again.
- Enabled the
HttpContext.BindModelAsync<'T>()extension method and thebindModel<'T>http handler to also bind to a model in the case of aPATCHorDELETEhttp request.
- Added
subRoutefhttp handler (see subRoutef) - Added
routexandrouteCixhttp handler (see routex) - Improved model binding (see Model Binding)
- Added new Model Validation API
- For more details, see the official Giraffe 1.1.0 release blog post.
routeBindworks when nested in asubRoutehandler nowrouteBinddoesn't crate a model object any more if the route arguments do not match the provided model
- JSON and XML serialization is now configurable through Dependency Injection (see Serialization)
- Added new features to validate conditional HTTP headers before processing a web request (see Conditional Requests)
- Added streaming capabilities (see Streaming)
- Added
HEAD,OPTIONS,TRACE,CONNECThttp handlers - Added more
HttpContextextension methods to create parity between response writing methods andHttpHandlerfunctions (see Response Writing and Content Negotiation) - Added detailed XML docs to all public facing functions for better Intellisense support
- The
Giraffe.Commonmodule auto opens now
- Deprecated
Griaffe.Tasks. Giraffe uses the original TaskBuilder.fs library now. - Giraffe comes with a default set of required dependencies which need to be registered via
services.AddGiraffe()during application startup now - The
Giraffe.TokenRouterlibrary has been moved to a separate NuGet package under the same name - Removed redundant serialization methods
- Removed
serializeJson,deserializeJson<'T>,deserializeJsonFromStream<'T>,defaultJsonSerializerSettings,defaultSerializeJson,defaultDeserializeJson<'T>,serializeXmlanddeserializeXml<'T>
- Removed
- Removed the
customJsonhttp handler - Renamed the
htmlhttp handler tohtmlString - Renamed the
renderHtmlhttp handler tohtmlView - Renamed
setBodyAsStringhttp handler tosetBodyFromString - Renamed
ReturnHtmlFileAsync()toWriteHtmlFileAsync()- The function can also accept relative and absolute file paths now
- Renamed
RenderHtmlAsync()toWriteHtmlViewAsync() - Removed the overloads for
BindJsonAsync<'T>,BindModelAsync<'T>andWriteJsonAsyncwhich accepted an object of typeJsonSerializerSettings - Renamed the
signOffhttp handler tosignOutto be more consistent with existing ASP.NET Core naming conventions - For more details, see the official Giraffe 1.0.0 release blog post.
- Renamed
portRoutetoroutePortsto be more consistent with other routing functions (route,routef,routeStartsWith, etc.)
routefandrouteCifboth support%Ofor matchingSystem.Guidvalues now- Added HTML attributes helper functions to the
GiraffeViewEngine.
- Renamed
Giraffe.XmlViewEnginetoGiraffe.GiraffeViewEngineas it represented more than just an XML view engine.
- Added automatic validation of the format string inside
routefandrouteCifto notify users of the notorious%dvs%ierror during startup.
- Fixed
ReadBodyFromRequestAsyncwhere the stream has been disposed before read could complete.
- Explicitly set the encoding to UTF-8 when reading the HTTP body during
ReadBodyFromRequestAsync
- Added the
htmlhttp handler which can be used to return atext/htmlresponse by passing in the html content as a string variable
- Added a new overload for
GetLoggerof theHttpContextextension methods, which allows one to pass in acategoryNamestring in order to initialise a new logger:let logger = ctx.GetLogger "categoryName". BindFormAsync,BindQueryStringandBindModelAsyncaccept an additional optional parameter forCultureInfo.
- Removed
Giraffe.Tasksfrom theGiraffeNuGet package and added a new dependency on the newly createdGiraffe.TasksNuGet package. You can use theGiraffe.TasksNuGet package from non ASP.NET Core projects now as well.
- Added HTTP status code helper functions.
- Added
defaultSerializeJsonanddefaultDeserializeJsonmethods. - Auto opened default Giraffe modules so that the core functionality can be entirely consumed through a single
open Giraffestatement. - The functionality from
Giraffe.Razor.MiddlewareandGiraffe.Razor.HttpHandlerscan be both consumed through a singleopen Giraffe.Razornow.
- Changed the
basetag from theXmlViewEnginefrom a regulartagto avoidTagto comply with the HTML spec.
- Renamed all async methods by appending
Asyncat the end of the method in order to comply with the general .NET naming conventionreadFileAsString-->readFileAsStringAsyncctx.ReadBodyFromRequest-->ctx.ReadBodyFromRequestAsyncctx.BindJson-->ctx.BindJsonAsyncctx.BindXml-->ctx.BindXmlAsyncctx.BindForm-->ctx.BindFormAsyncctx.BindModel-->ctx.BindModelAsyncctx.WriteJson-->ctx.WriteJsonAsyncctx.WriteXml-->ctx.WriteXmlAsyncctx.WriteText-->ctx.WriteTextAsyncctx.RenderHtml-->ctx.RenderHtmlAsyncctx.ReturnHtmlFile-->ctx.ReturnHtmlFileAsync
- Renamed
Giraffe.DotLiquid.HttpHandlersmodule toGiraffe.DotLiquid
- Added
portRoutehttp handler to filter an incoming request based on the port
- The
GET,POST,PUTandDELETEhttp handlers of theTokenRouter.fshave changed to accept a list of http handlers now.
- TokenRouter fringe case not being identified before (see #150)
- Added
requiresAuthPolicyhttp handler - Added
RenderHtmlandReturnHtmlFileextension methods to theHttpContextobject - Added
customJsonhttp handler, which allows users to define a custom json handler (with custom serialization settings) - Added overloads to
BindJsonandBindModelwhere a user can pass in a customJsonSerializerSettingsobject
- 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.DefaultSettingsobject - usecustomJsoninstead if customization is required) - Changed the
serializeJson,deserializeJsonmethods to accept an aditional parameter of typeJsonSerializerSettings
- Automatically URL decoding of string values when using
routef - Fixed an inference bug with
routefby replacing theformatparameter of thetryMatchInputmethod and thepathparameter of theroutefandrouteCifmethods fromStringFormattoPrintFormat - 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
htmlFilehttp handler by allowing thefilePathparameter to be either rooted or relative to theContentRootPath
- Added three additional
HttpContextextension methods in theGiraffe.HttpContextExtensionsmodule:WriteJson,WriteXmlandWriteText. These three methods can be used for direct HttpReponse writing from within a custom handler without having to sub-call thejson,xmlortexthttp handlers. - Changed the
UseGiraffeErrorHandlermethod to return anIApplicationBuildernow. This change allows middleware chaining. This is a breaking change and you'll either have to chain middleware or append an|> ignorein your application set up.
- Added the
Giraffe.TokenRoutermodule for speed improved route handling.
- Improved the
routeBindhttp handler to give users more flexibility in mapping routes to HTTP requests (see #110).
- Added CORS settings for localhost to the default giraffe-template
- Fixed bug in connection with the
ExceptionHandlerMiddleware(see #106)
- Updated Giraffe to .NET Standard 2.0. All Giraffe NuGet packages now target
net461andnetstandard2.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. General advice is to upgrade all .NET Core web applications to 2.0.
- Fixed bug where
readFileAsStringclosed the stream before the file could be read - [Giraffe.Razor 0.1.0-beta-002] Fixed bug so that
_ViewStart.cshtmlfiles get respected now - [giraffe-template 0.1.9] Fixed wrong version numbers in package references for
GiraffeandGiraffe.Razor
- Added support for
Async<'T>in thetask {}workflow. You can use anAsync<'T>from withintask {}without having to convert back to aTask<'T>
- Fixed the
warblerfunction. Should work as expected again. - Set the Giraffe dependency version in the template to a concrete version to avoid breaking changes in the template.
- First Beta release of Giraffe.
- Changed the type
XmlAttributefrom theXmlViewEngineto accept either astring * stringkey value pair or a boolean attribute of typestring. This was a missing to enable script tags such as<script src="..." async></script>.
- Added two helper functions (
attrandflag) to simplify the creation of those attributes.
- New
routeBindhttp handler - Annotated all default http handler functions with the
HttpHandlertype
- Fixed build error in the Giraffe template.
- Renamed
renderXmlStringtorenderXmlNodeand renamedrenderHtmlStringtorenderHtmlNode - Added two more methods which accept a
XmlNode list:renderXmlNodesandrenderHtmlNodes - Changed the return value of
encodedTextandrawTextto return a singleXmlNodeinstead ofXmlNode list. This has the advantage that it can be used from within another list, which was not possible before.
- A few modifications to the former
HtmlEngineso that it can be used for correct XML rendering as well. - Renamed the
Giraffe.HtmlEnginemodule toGiraffe.XmlViewEngine - Renamed
HtmlAttributetoXmlAttribute,HtmlElementtoXmlElementandHtmlNodetoXmlNode - Renamed and make the function
nodeToHtmlStringprivate - Added
commentfunction to theGiraffe.XmlViewEnginemodule for creating XML comments - Added
renderXmlStringandrenderHtmlStringfunctions toGiraffe.XmlViewEnginemodule for rendering XML and HTML nodes.
- Changed
HttpContext.BindQueryString<'T>()to return'Tinstead ofAsync<'T>
- Added
HttpContext.TryGetQueryStringValue (key : string)which returns anOption<string> - Added
HttpContext.GetQueryStringValue (key : string)which returns aResult<string, string>
- Split out the Razor view engine and the DotLiquid templating engine into separate NuGet packages:
Giraffe.RazorGiraffe.DotLiquid
- Also updated the
giraffe-templateNuGet package with the new changes and adapted thebuild.ps1PowerShell script to successfully build on Linux environments too. - Additionally TravisCI builds are run as part of every commit as well now.
- Added two new
HttpContextextension 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
- Added
plain/textas a new supported mime type to the defaultnegotiatehandler (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
HttpContextobject:ctx.GetService<'T>()andctx.GetLogger<'T>()
- Completely removed the
HttpHandlerContexttype and replaced all usage with the originalHttpContextobject from ASP.NET Core. - Extended the
ErrorHandlerfunction with a parameter to retrieve a defaultILoggerobject - Moved model binding functions from the
Giraffe.ModelBindingmodule into theGiraffe.HttpContextExtensionsmodule and made them extension methods of theHttpContextobject - Updated the
giraffe-templateNuGet package with the latest changes.
- Fixed #46
- Changed the signature of the
redirectTohttp handler (swappedpermanentwithlocation).
- Added
redirectTohttp handler.
- Using culture invariant converters in model binders.
- Added
bindQueryStringwhich can automatically bind a model from query string parameters - Extended
bindModelto includebindQueryStringwhen the HTTP method is notPOSTorPUT
- Added a
warblerfunction - Added model binding capabilities which can automatically bind a HTTP payload to a strongly typed model:
bindJson,bindXml,bindFormandbindModel
- Improved the
negotiateWithandnegotiatehttp handlers by making use of ASP.NET Core'sMediaTypeHeaderValueclass - Added
*.cshtmlfiles to the DotNet watcher in the template
- Fixed
AssemblyNameandPackageIdvalues in the template
- Added two new
HttpHandlerfunctions:negotiatechecks theAcceptheader of a request and determines automatically if a response should be sent in JSON or XMLnegotiateWithis 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.)
- Added a new programmatic view engine called
Giraffe.HtmlEngine - Addd a new
HttpHandlernamedrenderHtmlto return views from the new view engine
- Updated
Newtonsoft.Jsonto version10.0.* - Updated the Giraffe
dotnet newtemplate
- Added a new HttpHandler named
dotLiquidTemplate. The difference is that it let's the caller decide whatContent-Typethe response shall be. - Added a new HttpHandler named
razorView. The difference is that it let's the caller decide whatContent-Typethe response shall be. - Created a NuGet package called
giraffe-templatewhich is a newdotnet newtemplate for Giraffe projects
- NuGet package is being built with official VS 2017 build image by AppVeyor (using .NET Core SDK 1.0.1)
- Renamed the HttpHandler
htmlTemplatetodotLiquidHtmlView - Renamed the HttpHandler
razorViewtorazorHtmlView
- Removed
RazorLightas a dependency and replaced it with the official razor engine by ASP.NET Core MVC
- This release creates a new NuGet package named Giraffe.nupkg, which will be the new NuGet library for this project going forward. The old package AspNetCore.Lambda.nupkg will remain as-is for backwards compatibility and will not be removed or updated anymore.
- Added a default logger to the
HttpHandlerContext - Renamed NuGet package to Giraffe