All Versions
Latest Version
Avg Release Cycle
39 days
Latest Release
132 days ago

Changelog History
Page 1

  • v4.0.1

    October 18, 2019

    🛠 Fixed dependency references for TFM netcoreapp3.0 projects.

  • v4.0.0

    September 29, 2019

    ⬆️ Giraffe 4.0.0 has been tested against netcoreapp3.0 alongside netcoreapp2.1 and net461. All sample code has been upgraded to .NET Core 3.0 as well.


    🚀 This release of Giraffe fixes a bug in the routef handler which would have previously matched a route too eagerly.

    Route: /foo/bar/hello/world
    routef: /foo/bar/%s
    Match: true
    Route: /foo/bar/hello/world
    routef: /foo/bar/%s
    Match: false

    👀 For more information please see issue #347.

    🆕 New features

    • 👌 Support array of 'T as a child in form binding
    • ➕ Added a new DateTime extension method ToIsoString which produces a RFC3339 formatted string, and corrected the docs on the existing ToHtmlString extension method which actually produces a RFC822 formatted string.

    🐛 Bug fixes and breaking changes

    • 🛠 Fixed routef to not match more than one URL path segment.
    • 🛠 Fixed the _ariaLabelledBy attribute in the GiraffeViewEngine
    • 🛠 Fixed case insensitive route handlers on Ubuntu
    • 🔄 Changed minimum version of Newtonsoft.Json to 11.0.2. This allows Giraffe to be compatible with Azure Functions.
    • 📇 Renamed tryMatchInput to tryMatchInputExact and swapped the order of arguments so that the string value comes last
    • ➕ Added new version of tryMatchInput which accepts MatchSettings record:

      type MatchMode =
          | Exact                // Will try to match entire string from start to end.
          | StartsWith           // Will try to match a substring. Subject string should start with test case.
          | EndsWith             // Will try to match a substring. Subject string should end with test case.
          | Contains             // Will try to match a substring. Subject string should contain test case.
      type MatchOptions = { IgnoreCase: bool; MatchMode: MatchMode; }
  • v3.6.0

    February 10, 2019

    🐛 Bug fixes

    • 🛠 Fixed a bug in the subRouteCi http handler, which prevented nested sub routes to be case insensitive.

    🆕 New features

    • ➕ Added two new HttpContext extension methods to retrieve cookie and form values:
      • GetCookieValue (key : string)
      • GetFormValue (key : string)
  • v3.5.1

    January 20, 2019

    🐛 Bug fixes

    • 🛠 Fixed a bug in Giraffe's model binding to not try to set read only properties anymore.
  • v3.5.0

    December 28, 2018

    🆕 New features

    • ⚡️ Updated all packages and framework library dependencies to .NET Core 2.2.
    • ➕ Added a new GET_HEAD http handler (see: #314 for more info).
    • ➕ Added a new convenience function called handleContext, which can be used for creating new HttpHandler functions.

    🐛 Bug fixes

    • 🛠 Fixed the _data attribute in the GiraffeViewEngine to accept a key and value parameter now.
  • v3.4.0

    October 28, 2018

    🚀 Another quick minor release to push out the authorizeRequest http handler.

    🆕 New features

    • ➕ Added a new http handler called authorizeRequest to authorize a request based on a HttpContext -> bool predicate.
    • ➕ Added a new http handler called authorizeUser which is an alias for evaluateUserPolicy. The evaluateUserPolicy handler will be removed in the next major release.
  • v3.3.0

    October 28, 2018

    🚀 Minor release to publish a couple feature requests:

    🆕 New features

    • ➕ Added str as an alias for the encodedText function from the GiraffeViewEngine.
    • ➕ Added the HttpContext.GetRequestUrl() extension method to retrieve the entire URL string of the incoming HTTP request.
  • v3.2.0

    October 10, 2018

    👌 Improvements

    • ➕ Adding the charset parameter in the HTTP Content-Type response 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.
  • v3.1.0

    September 28, 2018

    🆕 New features

    • ➕ Added a new http handler called validatePreconditions to help with conditional requests:

      let someHandler (eTag : string) (content : string) =
          let eTagHeader = Some (EntityTagHeaderValue.FromString true eTag)
          validatePreconditions eTagHeader None
          >=> setBodyFromString content
    • Made previously internal functionality for sub routing available through the SubRouting module:

      • 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.

    👌 Improvements

    • 🐎 Performance improvements for Giraffe's default response writers.
    • 🐎 Performance improvements of the htmlView handler.
    • ⬆️ Upgraded to the latest TaskBuilder.fs NuGet package which also has the SourceLink integration now.

    🐛 Bug fixes

    • 🛠 Fixed the Successful.NO_CONTENT http handler, which threw an exception when calling from ASP.NET Core 2.1.
  • v3.0.0

    September 18, 2018

    💥 Breaking changes

    • 🔄 Changed the type XmlNode by removing the RawText and EncodedText union case and replaced both by a single Text union case. The HTML encoding (or not) is being done now when calling one of the two helper functions rawText and encodedText.

      • This change - even though theoretically a breaking change - should not affect the vast majority of Giraffe users unless you were constructing your own XmlNode elements which were of type RawText or EncodedText (which is extremely unlikely given that there's not much room for more nodes of these two types).
    • ✂ Removed the task {} override in Giraffe which was forcing the FSharp.Control.Tasks.V2.ContextInsensitive version of the Task CE. This change has no effect on the behaviour of task computation expressions in Giraffe. In the context of an ASP.NET Core web application there is not difference between ContextSensitive and ContextInsensitive which 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 explicitly open FSharp.Control.Tasks.V2.ContextInsensitive where before it might have been sufficient to only open Giraffe.

    • 🔄 Changed the members of the IJsonSerializer interface to accommodate new (de-)serialize methods for chunked encoding transfer.

      The new interface is the following:

      type IJsonSerializer =
          abstract member SerializeToString<'T>      : 'T -> string
          abstract member SerializeToBytes<'T>       : 'T -> byte array
          abstract member SerializeToStreamAsync<'T> : 'T -> Stream -> Task
          abstract member Deserialize<'T>      : string -> 'T
          abstract member Deserialize<'T>      : byte[] -> 'T
          abstract member DeserializeAsync<'T> : Stream -> Task<'T>

    👌 Improvements

    • 🐎 Significant performance improvements in the GiraffeViewEngine by changing the underlying composition of views from simple string concatenation to using a StringBuilder object.

    🆕 New features

    • 👌 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. NewtonsoftJsonSerializer is still the default JSON serializer in Giraffe (for stability and backwards compatibility), but Utf8JsonSerializer can be swapped in via ASP.NET Core's dependency injection API. The new Utf8JsonnSerializer is significantly faster (especially when sending chunked responses) than NewtonsoftJsonSerializer.
    • ➕ Added a new HttpContext extension method for chunked JSON transfers: WriteJsonChunkedAsync<'T> (dataObj : 'T). This new HttpContext method can write content directly to the HTTP response stream without buffering into a byte array first (see Writing JSON).
    • ➕ Added a new jsonChunked http handler. This handler is the equivalent http handler version of the WriteJsonChunkedAsync extension method.
    • ➕ Added first class support for ASP.NET Core's response caching feature.

    Special thanks

    🚀 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!