All notable changes to this project will be documented in this file.
- Declarative OpenAPI support.
RequestData
(andRequestValue
) to support complex form & query submissions,- Provided by an HTTP key/value pair (i.e.,
name=falco&classification=toolkit
) parser. - A derivative
FormData
contains parsedRequestValue
and access toIFormFileCollection
.
- Provided by an HTTP key/value pair (i.e.,
HttpContext.Plug<T>
for generic injection support of dependencies withinHttpHandler
's (service locator pattern).Request.getJson<T>
for generic JSON request deserialization, using default settings (property name case-insensitive, trailing commas allowed).Request.getCookies
, replacingRequest.getCookie
.Response.signInOptions
to sign in claim principal for provided scheme and options then responds with a 301 redirect to provided URL.Response.challengeAndRedirect
, replacingResponse.challengeWithRedirect
.Routing.map[Get|Head|Post|Put|Patch|Delete|Options|Trace|Any]
which producesHttpEndpoint
by associating a route pattern to anHttpHandler
after mapping route.Routing.setDisplayName
to set the display name of the endpoint.Routing.setOrder
to set the order number of the endpoint.WebApplication.run
, registers the providedHttpHandler
as the terminal middleware and runs the application.
Xss
module renamed toXsrf
. Functions:Xsrf.antiforgeryInput
,Xsrf.getToken
&Xsrf.validateToken
.
- Missing cancellation token pass-through during form reading,
multipart/form-data
streaming and JSON serialization/deserialization. - Empty request body support for JSON request methods.
WebApplication.UseFalcoNotFound
&IApplicationBuilder.UseFalcoNotFound
to correctly terminate by returningunit
akin to the native method.
net6.0
support dropped (end of life 2024-11-12).webHost [||] {}
builder removed.config {}
builder removed.HttpContext.GetLogger<T>()
extension removed.IApplicationBuilder.IsDevelopment()
,IApplicationBuilder.UseWhen()
extensions removed.Services.inject<T>
(and overloads) removed.Response.withContentLength
removed (unsupported).StringCollectionReader
and derivatives removed (FormCollectionReader
,QueryCollectionReader
,RouteCollectionReader
,HeaderCollectionReader
, andCookieCollectionReader
).- All replaced by homogenous
RequestData
type.
- All replaced by homogenous
Request.streamForm
,Request.streamFormSecure
,Request.mapFormStream
andRequest.mapFormStreamSecure
removed.Falco.Security.Crypto
andFalco.Security.Auth
modules removed.- Removed
Request.getCookie
, renamedRequest.getCookies
. - Removed
Response.challengeWithRedirect
, renamedResponse.challengeAndRedirect
. - Removed
Response.debugRequest
.
net7.0
andnet8.0
support added.- Added ability to configure
IWebHostBuilder
to host builder (i.e.,webHost [||] { web_host (fun webHost -> ...) }
).
- Execution order of configuration builder (i.e.,
configuration { add_env }
) set to match default configuration behaviour.
Request.getFormSecure
andRequest.streamFormSecure
.use_cors
to host builder (i.e.,webHost [||] { use_cors }
).
- Unused types
HttpContextAccessor
andAsyncHttpContextAccessor
.
- Working tutorial sample.
- Documentation website generator
/site
, and output/docs
.
- Internal utility functions
httpPipe
andhttpPipeTask
. See issue #94, #95.
- NuGet package metadata, invalid readme.
- Hello world sample to use ASP.NET static file middleware.
- Spelling and grammar of comments. See #96.
- Unused internal function
String.parseInt
.
Response.debugRequest
, which pretty prints the content of the current request to the screen.- Related community projects and libraries to README.md.
- NuGet package metadata, invalid icon path.
The project no longer intends to support anything prior to net6.0, which enables the built-in task {}
computation expression.
StringCollectionReader.GetChildren
, safely retrieves a collection of readers. Intended to be used with the "dot notation" collection wire format (i.e., Person.First=John&Person.Last=Doe&Person.First=Jane&Person.Last=Doe).MultipartReader.StreamSectionsAsync
for async streaming of multipart/form-data, following MSFT spec.Services.inject
helpers, for CPS-style dependency injection, supporting up to five generic input types.in_memory
,required_ini
,optional_ini
,required_xml
,optional_xml
custom operations added to the configuration builder.
StringCollectionReader
abstract attribute removed, to support nested readers.StringCollectionReader.Get{String|StringNonEmpty|Int16|Int32|Int|Int64|Boolean|Float|Decimal|DateTime|DateTimeOffset|Guid|TimeSpan}
default value made optional.- Upgraded host builder expression from
IWebHostBuilde
toWebApplication
.
Falco.Markup
, module has been extracted into it's own project.- Additional
StringCollectionReader
constructors, per-collection type. StringCollectionReader.TryArrayString
, useStringCollectionReader.GetStringArray
StringCollectionReader.TryArrayInt16
, useStringCollectionReader.GetInt16Array
StringCollectionReader.TryArrayInt32
, useStringCollectionReader.GetInt32Array
StringCollectionReader.TryArrayInt
, useStringCollectionReader.GetIntArray
StringCollectionReader.TryArrayInt64
, useStringCollectionReader.GetInt64Array
StringCollectionReader.TryArrayBoolean
, useStringCollectionReader.GetBooleanArray
StringCollectionReader.TryArrayFloat
, useStringCollectionReader.GetFloatArray
StringCollectionReader.TryArrayDecimal
, useStringCollectionReader.GetDecimalArray
StringCollectionReader.TryArrayDateTime
, useStringCollectionReader.GetDateTimeArray
StringCollectionReader.TryArrayDateTimeOffset
, useStringCollectionReader.GetDateTimeOffsetArray
StringCollectionReader.TryArrayGuid
, useStringCollectionReader.GetGuidArray
StringCollectionReader.TryArrayTimeSpan
, useStringCollectionReader.GetTimeSpanArray
HttpRequest.IsMultipart
,HttpRequest.TryStreamFormAsync
, useHttpRequest.StreamFormAsync()
Request.tryBindRoute
, useRequest.getRoute
.Request.tryBindQuery
, useRequest.getQuery
.Request.tryBindForm
, useRequest.getForm
.Request.tryBindFormStream
, useRequest.tryStreamForm
.Request.tryBindCookie
, useRequest.getCookie
.Request.getJson
, useRequest.getJsonOptions Constants.defaultJsonOptions
.Request.tryBindJsonOptions
, useRequest.getJsonOptions
.Request.tryBindJson
, useRequest.getJsonOptions Constants.defaultJsonOptions
.Request.bindJson
, useRequest.mapJson
.Request.bindRoute
, useRequest.mapRoute
.Request.bindQuery
, useRequest.mapQuery
.Request.bindCookie
, useRequest.mapCookie
.Request.bindForm
, useRequest.mapForm
.Request.bindFormStream
, useRequest.mapFormStream
.Request.bindFormSecure
, useRequest.mapFormSecure
.Request.bindFormStreamSecure
, useRequest.mapFormStreamSecure
.Response.withHeader
, useResponse.withHeaders [ x ]
.Response.redirect
, useResponse.redirectTemporarily
orResponse.redirectPermanently
- Embedded readme and project icon into NuGet package.
- Additional obsolete attributes to functions in preparation for v4.x.
Request.mapJson
failing to invoke next handler, caused by a bad merge which left the valid function body commented out.
- Obsolete attributes to `Request.bind{Json|Route|Query|Cookie|Form|FormStream|FormSecure|FormStreamSecure} functions in preparation for v4.x.
- Typo in
Markup.Attr.httpEquiv
.
Auth.signInOptions
to establish an authenticated context for the provide scheme, options and principalMarkup.Attr.open'
.- Missing .gitignore items for JetBrains.
Auth.challenge
to challenge the specified authentication scheme.Response.challengeWithRedirect
to challenge the specified authentication scheme and redirect URI.
- Website to address certain accessibility issues.
- Incorporated built-in
System.Task
expression, with compiler directives to continue supporting Ply usage.
StringCollectionReader
lookups made case-insensitive.
net6.0
support.
- Embedded PDBs to faciliate sourcelink.
HttpVerb.toHttpMethodMetadata
to properly capture theHttpVerb.ANY
to produce an emptyHttpMethodData
(notHttpMethodData [| "ANY" |]
).
- Mistakenly added, experimental
Request.signOut
function.
- Route name metadata to support ASP.NET link generator.
- Null check to internal
Response.writeString
. - Explicit starting size for the internal
StringBuilder
withinXmlNodeSerializer
- Comparative view engine benchmarks.
XmlNodeSerializer
type.- Source link support.
- Dependency on Ply.
Request.authenticate
to authenticate the current request using the provided scheme.
- TPL helpers.
- CSRF validation switched to occur after form is streamed, which includes enabling buffering for the request body.
stringf
function.
- Dependency on Taskbuilder.fs, replaced with TPL helpers.
FalcoEndpointDataSource
to properly integrate with ASP.NET endpoint routing.- Binary response handlers
Response.ofBinary
,Response.ofAttachment
. IConfiguration
builder expression with JSON input hooks.Auth.getClaimValue
IServiceCollection
operations to the HostBuilder expression:add_service
,add_antiforgery
,add_cookie
,add_conf_cookies
,add_authorization
,add_data_protection
,add_http_client
.IApplicationBuilder
operations to the HostBuilder expression:use_middleware
,use_if
,use_ifnot
,use_authentication
,use_authorization
,use_caching
,use_compression
,use_hsts
,use_https
,use_static_files
.not_found
operation added to HostBuilder expression to serve default document when no endpoints are matched.
- Internal
Response.writeBytes
to useBodyWriter
.
- Optional JSON config file fix, misassigned.
- MVC and REST templates
- PowerShell website build script.
- Null reference exception when consuming
IFormCollection.Files
.
Response.signInAndRedirect
.IEndpointRouteBuilder
extension methodUserFalcoEndpoints
.
Auth.hasScope
,Auth.tryFindClaim
,Auth.getClaim
.Request.ifAuthenticatedWithScope
.CookieCollectionReader
, accessible getRequest.getCookie
,Request.tryBindCookie
,Request.bindCookie
,Request.mapCookie
.StringUtils.strSplit
.
Markup.Elem.form
,Markup.Elem.button
,Markup.Elem.script
Markup.Templates.html5
not using provided language code.
net5.0
support.IHost
builder expression,webHost [||] {}
.IServiceCollection.AddFalco
.IServiceCollection.AddFalco (routeOptions : RouteOptions -> unit)
.IApplicationBuilder.UseFalco (endpoints : HttpEndpoint list)
.IApplicationBuilder.UseFalcoExceptionHandler (exceptionHandler : HttpHandler)
.QueryCollectionReader
.HeaderCollectionReader
.RouteCollectionReader
.
- Extensions,
HttpRequest.GetHeader
,HttpRequest.GetRouteValues
,HttpRequest.GetRouteReader
. - Exceptions.
ExceptionHandler
,ExceptionHandlingMiddleware
. - Host module,
Host.defaultExceptionHandler
,Host.defaultNotFoundHandler
,Host.startWebHostDefault
,Host.startWebHost
. IApplicationBuilder.UseHttpEndpoints (endpoints : HttpEndpoint list)
replaced byIApplicationBuilder.UseFalco (endpoints : HttpEndpoint list)
.Request.getHeader
,Request.getRouteValues
replaced byRequest.getRoute
,Request.tryGetRouteValue
.StringCollectionReader
? dynamic operator
- Multimethod
HttpEndpoint
support. StringCollectionReader.TryGetStringNonEmpty
which returnsNone
for empty, whitespace and null value strings.
Request.tryBindRoute
,Request.mapRoute
andRequest.bindRoute
.Request.bindQuery
.Request.bindJson
which usesSystem.Text.Json
.
- Dependency on Taskbuilder.fs, with internal extesion for
Task<unit> -> Task
conversion.
Request.validateCsrfToken
which usesMicrosoft.AspNetCore.Antiforgery
.Response.ofJson
which usesSystem.Text.Json
and referencesConstants.defaultJsonOptions
.Response.ofEmpty
.
- Parameter ordering for
Response.withCookieOptions
,Response.ofJsonOptions
to ensure configuration uniformly occured first.
-
HttpResponseModifier
defined asHttpContext -> HttpContext
used to make non-IO modifications to theHttpResponse
. -
Response
andRequest
modules, which provide functional access to theHttpResponse
andHttpRequest
respectively.Response.redirect
Response.withHeader
Response.withContentLength
Response.withContentType
Response.withStatusCode
Response.withCookie
Response.withCookieOptions
Response.ofString
Response.ofPlainText
Response.ofHtml
Response.ofJson
Response.ofJsonOptions
Request.getVerb
Request.getRouteValues
Request.tryGetRouteValue
Request.getQuery
Request.tryBindQuery
Request.getForm
Request.tryBindForm
Request.tryStreamForm
Request.tryBindJson
Request.tryBindJsonOptions
HttpHandler
definition changed toHttpContext -> Task
.Falco.ViewEngine
becomesFalco.Markup
- Markup functions are now fully qualified (i.e.,
Elem.h1
instead ofh1
). - `webApp
Still kicking myself over this brainfart. Starting version 1.1
for the win 🙄.