Skip to content

Releases: giraffe-fsharp/Giraffe

0.1.0-beta-700

22 Dec 11:57
Compare
Choose a tag to compare
0.1.0-beta-700 Pre-release
Pre-release

Breaking changes

  • Renamed portRoute to routePorts to be more consistent with other routing functions (route, routef, routeStartsWith, etc.)

New features

  • routef and routeCif both support %O for matching System.Guid values now
  • Added HTML attributes helper functions to the GiraffeViewEngine.

Example:

let html = p [ _class "someCssClass"; _id "greetingsText" ] [ encodedText "Hello World" ]

0.1.0-beta-600

20 Dec 15:11
Compare
Choose a tag to compare
0.1.0-beta-600 Pre-release
Pre-release

Breaking changes

  • Renamed Giraffe.XmlViewEngine to Giraffe.GiraffeViewEngine as it represented more than just an XML view engine.

New features

  • Added automatic validation of the format string inside routef and routeCif to notify users of the notorious %d vs %i error during startup.

0.1.0-beta-511

19 Dec 19:18
Compare
Choose a tag to compare
0.1.0-beta-511 Pre-release
Pre-release

Bug fixes

  • Fixed ReadBodyFromRequestAsync where the stream has been disposed before read could complete.

0.1.0-beta-510

19 Dec 17:09
Compare
Choose a tag to compare
0.1.0-beta-510 Pre-release
Pre-release

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 a text/html response by passing in the html content as a string variable

0.1.0-beta-500

12 Dec 16:01
Compare
Choose a tag to compare
0.1.0-beta-500 Pre-release
Pre-release

New features

  • Added a new overload for GetLogger of the HttpContext extension methods, which allows one to pass in a categoryName string in order to initialise a new logger: let logger = ctx.GetLogger "categoryName".
  • BindFormAsync, BindQueryString and BindModelAsync accept an additional optional parameter for CultureInfo.

Breaking changes

  • Removed Giraffe.Tasks from the Giraffe NuGet package and added a new dependency on the newly created Giraffe.Tasks NuGet package. You can use the Giraffe.Tasks NuGet package from non ASP.NET Core projects now as well.

0.1.0-beta-400

04 Dec 22:02
Compare
Choose a tag to compare
0.1.0-beta-400 Pre-release
Pre-release

New features

  • Added HTTP status code helper functions.
  • Added defaultSerializeJson and defaultDeserializeJson 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 and Giraffe.Razor.HttpHandlers can be both consumed through a single open Giraffe.Razor now.

Bug fixes

  • Changed the base tag from the XmlViewEngine from a regular tag to a voidTag 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 convention
    • readFileAsString --> 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 to Giraffe.DotLiquid

0.1.0-beta-310

30 Nov 12:18
Compare
Choose a tag to compare
0.1.0-beta-310 Pre-release
Pre-release

New features

  • Added portRoute http handler to filter an incoming request based on the port

Breaking changes

  • The GET, POST, PUT and DELETE http handlers of the TokenRouter.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

18 Nov 07:36
Compare
Choose a tag to compare
0.1.0-beta-300 Pre-release
Pre-release

New features

  • Added requiresAuthPolicy http handler
  • Added RenderHtml and ReturnHtmlFile extension methods to the HttpContext object
  • Added customJson http handler, which allows users to define a custom json handler (with custom serialization settings)
  • Added overloads to BindJson and BindModel where a user can pass in a custom JsonSerializerSettings 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 - use customJson instead if customization is required)
  • Changed the serializeJson, deserializeJson methods to accept an aditional parameter of type JsonSerializerSettings

Bug fixes and improvements

  • Automatically URL decoding of string values when using routef
  • Fixed an inference bug with routef by replacing the format parameter of the tryMatchInput method and the path parameter of the routef and routeCif methods from StringFormat to PrintFormat
  • 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 the filePath parameter to be either rooted or relative to the ContentRootPath

0.1.0-beta-200

29 Oct 17:36
Compare
Choose a tag to compare
0.1.0-beta-200 Pre-release
Pre-release
  • Added three additional HttpContext extension methods in the Giraffe.HttpContextExtensions module: WriteJson, WriteXml and WriteText. These three methods can be used for direct HttpReponse writing from within a custom handler without having to sub-call the json, xml or text http handlers.
  • Changed the UseGiraffeErrorHandler method to return an IApplicationBuilder 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

25 Oct 07:11
Compare
Choose a tag to compare
0.1.0-beta-110 Pre-release
Pre-release

Added the Giraffe.TokenRouter module for speed improved route handling.