This list is not currently intended to be all-encompassing - it will document major and breaking API changes with their rationale when appropriate:
- [http4k-server-ratpack] New backend module!
- [http4k-format-jackson-yaml] New module!
- [all] Upgrade some dependency versions.
- [http4k-cloudnative] - Fix #418 - Fix separator propagation when adding values to an existing MapEnvironment. H/T @jshiell
- [http4k-contract] - Add support for securing the API description endpoint. H/T @goodhoko for the PR.
- [http4k-client-websocket] Added auto-reconnection support on blocking WsClient. H/T @alphaho for the PR.
- [http4k-format-*] Rename/deprecate
asXYZString(Any)
->asFormatString(Any)
in all modules
- [http4k-server-ktornetty] New backend module! H/T @albertlatacz for the contribution!
- [all] Upgrade some dependency versions.
- [http4k-security-oauth] Fix #414 BasicAuth server filter to not throw an exception on invalid base64 input. H/T @Sebruck for the fix.
- [all] Upgrade some dependency versions.
- [http4k-template-pebble] Fix #411 - Non-root pebble templates when using CachingClasspath from a compiled JAR. H/T @alyphen
- [http4k-server-ktorcio] Fix #410 - KtorCIO does not stop properly.
- [all] Upgrade some dependency versions.
- [http4k-core] Factored out
Http4kServletAdapter
to allow usage of the Servlet API outside of creating a Servlet instance. - [all] [Breaking (prevent API abuse)] Restricted generic
with()
method actual http4k types. Usage outside our API should not use this method. - [http4k-contract] Fix #404 - Rework of some
FieldRetrieval
classes to remove duplication and to support PropertyNamingStrategies set at the global level
- [all] Upgrade some dependency versions.
- [all] [Breaking (if you're not using it right!)] Fix #397 - Fixed up Maven dependencies so that they are not bringing in runtime libraries.
- [http4k-core] - Add enum StringBiDiMapping #395 - H/T @goodhoko
- [all] Upgrade some dependency versions, including Kotlin to
1.3.72
. - [http4k-security-oauth] A strategy can now be passed into
AuthRequestWithRequestAuthRequestExtractor
to determine how to combineAuthRequest
andRequestObject
H/T @tom
- [all] Upgrade some dependency versions.
- [http4k-testing-servirtium] Improve error diagnostics. H/T @vchekan for the PR.
- [all] [Unlikely Break] Change
Router
to returnRouterMatch
instead of nullableHttpHandler
. This allows us to supportMETHOD_NOT_ALLOWED
(405) if we match a path but not a verb instead of justNOT_FOUND
(404). This should break custom ro H/T @jshiell for the PR.
- [http4k-security-oauth] [Breaking]
client_id
along with the correspondingTokenRequest
is passed into access and refresh token generators so additional validation can take place H/T @tom
- [all] Upgrade Kotlin to
1.3.71
. - [http4k-testing-servirtium] Switch OkHttp client for Apache.
- [http4k-server-jetty] Made some classes non-internal so they can be easily reused for custom
ServerConfig
implementations.
- [http4k-client-websocket] [Breaking] Added extra onError handler when creating a non-blocking websocket.
- [all] Upgrade some dependency versions, including Kotlin to 1.3.70.
- [http4k-security-oauth] Early work on supporting refresh tokens. H/T @tom
- [http4k-core] Fix #377.
Added replaceHeaders()
method. Thanks to @bastman for the idea. - [http4k-contract] Fix nullability of references in OpenApi3
- [http4k-testing-servirtium] Don't pass recording handler into non-test methods as a resolved parameter.
- [http4k-testing-chaos] [Break/Rename] ChaosEngine is now exposed when configuring API. Renamed
withChaosEngine()
towithChaosApi()
, replacedtoggle()
andupdate()
withenable()/disable()
- [http4k-testing-chaos] [Break] Tweaked API make it simpler to use the
ChaosEngine
via programmatically (as opposed to REST). - [http4k-testing-servirtium] [Tiny break] Tweaks to
InteractionOptions
to make working with Servirtium tests a bit nicer.
- [http4k-testing-servirtium] Upgrade ServirtiumServer to use OkHttp instead of JavaHttpClient (due to streaming restrictions on MiTM).
- [http4k-testing-servirtium] [Break] Rename
Github
toGitHub
.
- [http4k-format-kotlinx-serialization] New JSON module! H/T @joscha-alisch for the PR. :)
- [http4k-testing-servirtium] Work around Kotlin @JvmOverloads problem in ServirtiumServer.
- [all] Upgrade some dependency versions.
- [http4k-testing-servirtium] Making API a bit more Java-compatible friendly. Ability to vary the Server implementation.
- [http4k-server-jetty] Fix #362 - Websocket disconnect early causes lateinit reference race condition. H/T @fintara for the report/fix.
- [http4k-aws] Improved efficiency of building AWS credentials (replace String.format).
- [http4k-testing-servirtium] Making API a bit more Java-compatible friendly.
- [all] Upgrade some dependency versions.
- [http4k-security-oauth] Allowing for custom authenticate methods when fetching access tokens H/T @tom
- [http4k-testing-servirtium] [Breaking] API is still in beta, so moving to a more composed approach which will increase reuse and allow for running Servirtium infra without a dependency on http4k or Junit. Added loading from GitHub. :)
- [http4k-security-oauth] [Breaking] Audience on request object is now a list to support multiple audiences. H/T @tom
- [http4k-security-oauth] Nonce is now also passed through on RequestJwts, so it can be added to request jwts. H/T @tom
- [http4k-core] Implmement #340. Support SameSite cookies. H/T @danielwellman for the contribution.
- [http4k-format-jackson] Made
JacksonJsonPropertyAnnotated
Kotlin 1.4 safe (call to superclass might return null). H/T @pyos for spotting this.
- [http4k-testing-servirtium] Moved Servirtium code to new module - was previously [http4k-incubator].
- [http4k-incubator] Rewrote Servirtium code to support manipulations.
- [http4k-security-oauth] Fix issue where
AuthRequestWithRequestAuthRequestExtractor
doesn't take into account scopes not being nullable correctly. H/T @tom
- [http4k-security-oauth] Adding
expiry
toRequestObject
. H/T @tom - [http4k-security-oauth] Fixing issue where unknown fields cause extracting
RequestObject
from a jwt, fails due to unknown fields. H/T @tom
- [http4k-security-oauth] [Breaking] Error responses in the authorise endpoint now take into account values from the
request
parameter, this will require a validator for that jwt be implemented. H/T @tom - [http4k-security-oauth] [Breaking] State is now its own type, and not just a string, so it can be validated. H/T @tom
- [http4k-security-oauth] [Breaking]
redirectUri
onAuthRequest
is now nullable as it might come on a request jwt, this is validated to be always be present downstream. H/T @tom - [http4k-security-oauth] Allow parsing of request jwt. H/T @tom
- [http4k-security-oauth] Adding
RequestObject
toAuthRequest
. H/T @tom - [http4k-security-oauth] Adding
AuthRequestWithRequestAuthRequestExtractor
that will extract the request from the jwt, assuming the validator is implemented which can be used instead of just usingAuthRequestFromQueryParameters
if support for parsing a request jwt is required. H/T @tom
- [all] [Unlikely break from Java only] Make all custom http4k exceptions extend RuntimeException. This helps with Java compatibility so things like LensFailure inside Java Lambdas don't require catching (as they are caught/dealt with by other bits of http4k automatically)
- [http4k-moshi] [Behaviour break] Fix #353 Don't fail by default on unknown properties. This is the expected default behaviour for all JSON implementations. H/T cnusp for the report.
- [http4k-incubator] Next iteration of Servirtium JUnit extensions. Improved API to support multiple storage engines.
- [http4k-incubator] Next iteration of Servirtium JUnit extensions. Correct indexing of interactions.
- [http4k-security-oauth] Authorisation rendering will now taking into account 'response_mode' of either query or fragment in responses and no longer just use the default fo the 'response_type'. H/T @tom
- [http4k-security-oauth] [Breaking] Error responses in the authorise endpoint will actually redirect back to 'redirect_uri' assuming the validator correctly validates both the 'client_id' and 'redirect_uri' to be valid. H/T @tom
- [all] Upgrade some dependency versions.
- [http4k-incubator] Next iteration of Servirtium JUnit extensions. Only check content which is in the contract when replaying.
- [http4k-core] [Breaking] Removed clashing Events
then()
from deprecated (meaning it cannot be used as there is also anotherthen()
in that package). Use the one inorg.http4k.events
instead. - [http4k-security-oauth] Adding nonce to AuthorizationCodeDetails H/T @tom
- [http4k-core] GZip client filters now send correct accept-encoding header. @jshiell
- [http4k-core] New AcceptGZip client filter allows handling of remote GZip without compressing client requests. @jshiell
- [http4k-core] Fix #344 H/T Streaming GZip encoder loses data. @jshiell
- [http4k-security-oauth] Fixing wrong AuthRequestExtractor passed to AuthRequestTrackingFilter. H/T @tom
- [http4k-security-oauth] allowing additional properties to be stored on auth request, if using additional extractors H/T @tom
- [http4k-core] Fixes for #338 - Gzip filters send content-encoding of gzip even when body is empty. H/T @jshiell
- [http4k-security-oauth] [Break] OIDC callback urls using the ResponseType 'code id_token' will now have the parameters returned as a fragment not a query as per 3.3.2.5 of the OpenID Connect Core 1.0 spec H/T @tom
- [http4k-security-oauth] [Break] Initial support of nonce in OIDC requests H/T @tom
- [http4k-core] Support for GZipping response streams. H/T @jshiell
- [http4k-security-oauth] Adding expires_in to token endpoint response. H/T @tom
- [all] Added
Status
to auto-marshalling JSON mappings. - [http4k-security-oauth] Adding token_type to token endpoint response, and strip out nulls in response. H/T @tom
- [all] Upgrade some dependency versions.
- [http4k-core] PR #333. Copy zipkin traces across threads. H/T @jshiell for the PR.
- [http4k-testing-approval] Close Readers when reading from them.
- [http4k-incubator] Next iteration of Servirtium JUnit extensions for recording and replaying.
- [all] Upgrade some dependency versions
- [http4k-incubator] Added first cut of Servirtium classes for recording and replaying traffic. Needs validating in the wild
- [http4k-format-jackson] Fix #320. http4k-format-jackson incompatible with jackson-module-kotlin 2.10.1
- [all] Upgrade some dependency versions.
- [http4k-contract] Fix #323. Doc generation does not work with multipart lenses.
- [http4k-format-jackson] Fix #313. Jackson serialization is not working properly with polymorphic types stored in a collection. H/T @alphaho for the PR :)
- [http4k-core] [Break] Renamed
value
onParamMeta
todescription
.
- [all] Upgrade some dependency versions, including Kotlin to 1.3.61
- [http4k-security-oauth] allowing setting scopes on AccessToken creation so they are set on the response. H/T @tom
- [http4k-core, http4k-aws] - increase efficiency of Hex implementation for trace ids and HMAC. H/T @time4tea
- [http4k-cloudnative] Reimplemented Environment to be more efficient. H/T @time4tea for noticing this.
- [http4k-security-oauth] On generating tokens allowing for the client id to be based on the result of validation rather than just the form parameters of the request. To support client assertions. H/T @tom
- [http4k-security-oauth] Adding new errors to support issues with client assertions. H/T @tom
- [http4k-security-oauth] Allowing a scope to be set on AccessToken. Allowing for more low level validation of Authorise and Token Requests, by implementing
org.http4k.security.oauth.server.AuthoriseRequestValidator
andorg.http4k.security.oauth.server.accesstoken.AccessTokenRequestAuthentication
respectively. H/T @tom
- [http4k-contract] Support multiple request bodies in OpenApi v3
- [http4k-format-jackson] Fix #313 Part 2 - Revert default behaviour for collections of polymorphic types, but is now overridable by using
autoBody()
instead ofauto()
. Reopened #313.
- [http4k-format-jackson] [Breaking] Fix #313 - ConfigurableJackson.autoBody implementation would not work with collections of polymorphic types. This fix has the effect of blowing up auto-json behaviour when classes are defined inside functions (causing nasty
java.lang.reflect.GenericSignatureFormatError: Signature Parse error
exceptions). To remedy, just move inlined classes outside of the functions that they are defined in. H/T @alphaho for the PR. - [all] Update some dependency versions
- [http4k-core] [Breaking] Reworking of ContentType to support multiple directives.
directive
field is nowdirectives
, so just add the extra 's' to fix :) - [http4k-security-oauth] Moar options on
OAuthProviderConfig
. H/T @tom
- [all] Update some dependency versions, including Kotlin to
1.3.60
. - [http4k-core] Make Query value optional when setting on a
Request
. - [http4k-core] [Breaking] Fix #316. Optional Query lens handling is more accurate. See issue for details of change in behaviour.
- [all] Update some dependency versions.
- [http4k-format-jackson, http4k-format-gson] Add support for auto marshalling
Throwable
in a sensible way. - [http4k-cloudnative] Renamed badly named
UpstreamRequestFailed
toRemoteRequestFailed
. Improved error handling.
- [http4k-cloudnative] Fix adding value to overridden environment when using
set()
. H/T @jippeholwerda for the PR
- [http4k-security-oauth] Tweak to handle Content-Type comparisons (with and without directive). H/T @jippeholwerda for the PR
- [http4k-multipart] - [Breaking] Added support for setting custom headers in Multipart form fields and files. This has removed the
String
as the default field type (it is nowMultipartFormField
. Calls to create lenses usingMultipartFormField
will now requireMultipartFormField.string()
instead.
- [http4k-contract] Useful tweaks to the contracts API
[http4k-cloudnative] Fix #304 - map get()
does not respect fallback values in overridden environment.
- [http4k-contract] Marking endpoints as deprecated in OpenApi3
- [http4k-template-jade4j] New module! H/T @RichyHBM for the contribution! :)
- [http4k-contract] Better support for overriding of raw map definition id in JSON schema generation
- [http4k-core] Added method to (immutably) modify status on
Response
. H/T @brandon-atkinson for the suggestion - [http4k-core] Added composite object support to lens system, allowing creation of simple lenses which draw from several different values (of the same location only - e.g Query/EnvironmentKey)
- [http4k-contract] Support for overriding the entity definition id in JSON schema generation
- [all] Update some dependency versions.
- [http4k-server-netty] Fix reported port in
Netty
. H/T @fantayeneh for the PR :) - [http4k-security-oauth] Add
validateScopes()
toClientValidator
. H/T @tom
- [http4k-contract] Support multiple-response models in OpenApi2 and 3. Note that this currently is unsupported in the OpenApi UI due to a bug (which doesn't display the schema for the response correctly). However, the JSON schema is generated correctly in these cases.
- [all] Update some dependency versions.
- [all] Update some dependency versions, and changes to various APIs involved (Jackson and Resilience4J)
- [http4k-core] - Add YearMonth support to standard JSON mappings
- [http4k-format-jackson, http4k-format-gson] [Possible break] - Moved reified
NODE.asA()
method fromJsonLibAutoMarshallingJson
down onto the instances of theJson
(ConfigurableJackson
/ConfigurableGson
). This is so that we can handle generified classes such as lists and maps correctly. (As per the problems fixed in 3.181.0)
- [http4k-core] - Rollback a couple of places which were using Java9+ APIs (for no good reason).
- [http4k-contract] Improvements to rendering enums as their own objects in JSON Schema.
- [http4k-contract] Add
Cookies
options to contract DSL
- [http4k-serverless-lambda] Add ability to access Lambda context. H/T @ivoanjo for the PR.
- [http4k-contract] Fix rendering of OrSecurity when there are more than 2 parts.
- [http4k-core] Rename
EventsFilter
toEventFilter
because sanity. - [http4k-format-jackson, http4k-format-gson] Reintroduce
autoBody()
method
- [http4k-core] Added base events implementations for StructuredLogging.
- [http4k-core] [Repackage] Events classes are now in
org.http4k.events
. - [http4k-core] [Breaking]
EventCategory
is no longer a field ofEvent
. To fix, just removeoverride
from yourEvent
classes. - [http4k-format-jackson, http4k-format-gson] Fixed problem when attempting to deserialise generic Lists.
- [all] Update various dependencies.
- [http4k-testing-hamcrest] Improve messages of Hamkrest matchers. H/T @albertlatacz
- [http4k-cloudnative] Fix #291 - Readiness check result when there are > 2 checks may not report the correct result. H/T @alfi
- [http4k-security-oauth] [Possibly breaking] Making client_secret optional in AuthorizationCodeAccessTokenRequest to support non client_secret flows. H/T @tom
- [http4k-client-okhttp] Include status description in Response object.
- [http4k-contract] Added
OpenApiExtension
interface, which allows the definition of extensions that will modify the OpenApi specification JSON. H/T @rgladwell for the inspiration. - [http4k-contract] Support composite security models using
or()
andand()
. Once again, H/T @rgladwell :)
- [http4k-security-oauth] [Possibly breaking] Request is passed as a parameter to the ClientValidator. Just pass it in! :) H/T @tom
- [http4k-contract] [Behaviour change] When specified, individual route security now replaces global security (this is as the security model in the OpenApi spec is specified) as opposed to both being applied.
- [http4k-security-oauth] [Possibly breaking] More support for OIDC, adding state to AuthorizationCodeDetails, and passing it into createForAccessToken on IdTokens. H/T @tom
- [http4k-security-oauth] More support for OIDC. H/T @tom
- [all] Update various dependencies, including Kotlin to 1.3.50.
- [http4k-security-oauth] Some support for OIDC. H/T @tom
- [all] Update various dependencies, including Jackson for a CVE.
- [http4k-core] Fix #273 - parentSpanId trace incorrectly populated when no previous traces
- [http4k-contract] [Unlikely Break] Remodelled how Security is rendered, so it's possible that this may break slightly for customer implementations
- [http4k-contract] Added support for Implicit OAuth flow, with suport for custom
googleCloudEndpoints
Security. H/T @rgladwell
- [http4k-core] Added uni-directional serialization/deserialization options to JSON lib auto-conversion configuration.
- [http4k-core] [Break (mitigation)] Replaced default resource loader location for
singlePageApp()
to/public
instead of root - this is for safety of NOT serving the root of the classpath by default.
- [http4k-core] Add a warning when
static()
is used with no package path, thus exposing the contents of the classpath remotely.
- [all] Update various dependencies.
- [http4k-contract] Collect LensFailure causes into a single place when validating.
- [http4k-contract] [Possibly Break] Open out
ErrorResponseRenderer
interface to take LensFailure instead of the individual failures when renderingbadResponse()
. To fix, simply wrap the list of failures into a LensFailure.
- [http4k-core] Tweak
singlePageApp()
routing handler, to correctly apply filters when fallback page is used.
- [http4k-core] Added
singlePageApp()
routing handler, which matches both static content or falls back to the root path index file
- [http4k-contract] Fix invalid OpenApi2 when root and base path match. H/T @rgladwell
- [http4k-contract]
ContractRoute
is now anHttpHandler
, so no need to wrap contract routes in acontract {}
to test them. H/T @rgladwell for the inspiration. - [http4k-contract] Support Host/baseUri values in OpenApi2. H/T @rgladwell
- [http4k-contract] Optionally add description route to route list H/T @rgladwell
- [all] Update various dependencies, including Kotlin to 1.3.41.
- [http4k-testing-approval] Upgrade of HTML library from above may have an effect on output of HTML approval tests.
- [http4k-contract] Support for more Jackson annotations in JSON Schema rendering. H/T @tom for the PR contributing this.
- [http4k-testing-chaos] Add detail to Chaos OpenApi interface.
- [http4k-testing-chaos] Add detail to Chaos OpenApi interface.
- [http4k-cloudnative] Added Forbidden request exception to HandleUpstreamRequestFailed.
- [http4k-testing-chaos] Countdown chaos trigger fixed.
- [http4k-testing-chaos] Slight fix to avoid consuming stream body when setting chaos.
- [all] Update various dependencies.
- [http4k-client-okhttp] Updated
OkHttp
to v4.0.0 (Kotlin edition). - [http4k-contract] Tweak to JSON Schema rendering to handle recursive objects better.
- [http4k-server-netty] Fix #260 - cannot set multiple response headers with same name
- [http4k-server-undertow] Fix #260 - cannot set multiple response headers with same name
- [http4k-contract] POSSIBLE BEHAVIOUR CHANGE DUE TO BUG: Fix #259 - Contract blocks do not produce 400s if an external CatchAll is provided. This may have an effect on how errors are generated (a 400 is produced instead of the previous 500 from the CatchAll).
- [http4k-security-oauth] Fix broken deprecation annotation.
- [http4k-security-oauth] Default to JSON format response in Access Token response
- [http4k-security-oauth] Renamed a couple of classes (AccessTokenContainer -> AccessToken), and removed
isValid
method fromAuthorizationCodes
because it doesn't make sense for this to be on the OAuthServer.
- [all] Update Kotlin to 1.3.40
- [http4k-contract] Support OAuthSecurity renderer.
- [all] Update various dependencies.
- [all] Dokka improvements. Does not mitigate #196 as we run the main build on OpenJdk11. H/T @ivoanjo
- DO NOT USE - broken
- DO NOT USE - broken
- [http4k-multipart] Made the multipart header parser case-insensitive. H/T @tenniscp25
- [http4k-contract] Add
SchemaModelNamer
to allow for custom JSON Schema model names.
- [http4k-contract] OperationIds are generated without illegal characters
{}
.
- [http4k-contract] Support non-string keys for "text convertible" values in maps for Auto-schema generation.
- [http4k-contract] Fixed Auto-schema generation to detect and remove duplicate items from list schemas.
- [http4k-security-oauth] Make authentication mechanism for grant types configurable.
- [http4k-security-oauth] Initial support for
client_credentials
grant type.
- [http4k-contract] Jackson property searching in OpenApi3 now searches superclasses.
- [http4k-contract] Support custom
JsonProperty
annotation for OpenAPi3 generation - [http4k-cloudnative] New exception type for unuathorised. H/T @tom
- [http4k-contract] Fix #228 - Support Map-based fields in OpenApi 3 Auto-schema generation as
additionalProperties
. H/T @noahbetzen-wk for the idea.
- [http4k-contract] Reimplement Auto-schema generation using reflection. Added test cases to use the OpenApi generator to create valid code-based OpenApi clients using the OpenApi generator.
- [http4k-format-jackson] Removed reflective JSON schema creator, since it was not actually OA3 compliant.
- [all] Update various dependencies.
- [http4k-contract] Improvements to better adhere to OA3 spec.
- [http4k-security-oauth] Allow injecting OpenID's
request
parameter into the authorization request. - [http4k-security-oauth] Expose request to AuthRequestTracking.
- [http4k-core] Replace RequestContexts with reference to Store. H/T @amcghie
- [http4k-contract] Added some missing deprecations.
- [http4k-contract] Fix #243 - Nulls not allowed in OpenApi V3 JSON models.
- [http4k-contract] Fix #239 - OpenApi v3 schemas for raw lists blow up when rendering.
- [all] Update various dependencies.
- [http4k-contract] Both OpenApi v2 and v3 are now supported, including automatic schema generation. Some classes for
OpenApi2 have moved to a new package - Deprecations should provide most alternatives. See module docs for details. For OpenApi v3, optionally include
http4k-format-jackson
to get JSON schema models based on JVM objects. - [http4k-format-jackson] Added reflective JSON schema creator, to be used for generating named models from JVM objects.
- [http4k-core] - Fix #233 - MemoryBody blows up with "java.nio.ReadOnlyBufferException"
- [http4k-core] - Tighten up security on Basic and Bearer auth server filters. H/T @andymoody
- [http4k-security-oauth] - Add filter to check bearer token is valid access token. H/T @andymoody
- [all] Update dependencies (including Kotlin bump to 1.3.31)
- [http4k-security-oauth] Handle user rejecting/failing authentication. H/T @andymoody
- [http4k-security-oauth] Allow access token generation to explicitly reject an authorization code already used. H/T @andymoody
- [http4k-security-oauth] Amend error responses from access token generation. H/T @andymoody
- [http4k-contracts] Tweaks to Security model for
http4k-contracts
. (Renamed)ApiKeySecurity
is now a proper class, and addedBasicAuthSecurity
. You can now also override the security model on a per-route basis. - [http4k-contract] Added ability to set the
Security
on each individual contract route. This overrides anySecurity
set on a contract-level basis.
- [http4k-serverless] Allow invocation of serverless functions locally. H/T @Charlyzzz
- [http4k-core] Fix #226 - ResourceLoadingHandler not close stream
- [http4k-security-oauth] Rename AuthRequestPersistence to AuthRequestTracking
- [http4k-security-oauth] Allow the http request to be referenced when generating OAuth authorization codes. H/T @andymoody
- [http4k-core] Change
mime.types
location so it doesn't conflic with other libraries. H/T @benusher and @dgliosca - [http4k-testing-chaos] Added
SnipRequestBody
behaviour. - [http4k-core] (Small) Breaking Fixed location of some extension files to be relevant to the particular package that they are referencing. This will require reimporting the new location into your source if you were using the imports.
- [http4k-testing-approval] Made content-type aware approval tests check the content type after the content. This is friendlier for failing tests, as it is more important that the content is correct than the content-type (and often errors don't have content type set so you get an erroneous error message which masks the fact that the content was wrong).
- [http4k-cloudnative]
HandleUpstreamRequestFailed
client filter now takes a predicate(Response) -> Boolean
instead of a boolean. This allows for more fine grained custom control of which Responses are acceptable. - [all] Upgrade deps, including Kotlin to
1.3.30
. - [http4k-contract] Fix #221 - Contract path fixed segments cannot contain slash characters.
- [http4k-format-jackson] Convert
Jackson
to usereadValue
instead ofconvertValue
. This fixes some problems with type conversions.
- [http4k-core] (Possible) Break: Made lense implementations
Query, Header etc
clear previous values by default instead of appending. This leads to a more consistent behaviour. In order to be able to set multiple values on an object using a lense, use themulti
form instead - eg.Header.required("foo")
->Header.multi.required("foo")
. We envisage the impact of this change is limited as it's only Queries that generally can have multiple possible values, and in the vast majority of cases a replace rather than append is expected.
- [http4k-contract] Generify contract handling code to allow for custom
HttpMessageMeta<XYZ>
- (Slight) Break: Collapsed
UpstreamRequestFailed
exceptions to contain the status, and thus removing non-special cases likeBadRequest
andBadGateway
. This makes them much easier to use in practice as users have access to the the status. To migrate, simply replace previous classes withUpstreamRequestFailed(Status.XYZ, message)
. - [http4k-contract] Open up
ContractRoute
API to facilitate extension when defining a customContractRenderer
. - [all] Upgrade deps.
- [http4k-core] Added base64 to the supported mappings for Query/Headers etc...
- [http4k-testing-approval] Approver does not write actual output if there is none to write and there is no approved content
- [http4k-testing-approval] Improved
Approver
interface to more closely match the traditionalassert<XYZ>
approach - this results in a more discoverable/obvious API. - [http4k-testing-hamkrest] Added ability to create a Hamkrest matcher directly from the
Approver
instance to be combined with other relevant matchers.
- [http4k-testing-approval] Add support for XML and HTML approval tests.
- Added
http4k-testing-approval
module, which is compatible with JUnit5 tests and integrates with the OkeyDoke approval testing files and IntelliJ plugin. H/T to @jshiell for the inspiration Gist containing the base Junit5 Extension.
- [http4k-security-oauth] Make authentication response available when creating AuthorizationCode.
- [http4k-security-oauth] Introduce OAuthServer to
http4k-security-oauth
to assist in the creation of authorization servers.
- Generified
GenerateXmlDataClasses
filter, and added default implementations forhttp4k-format-jackson-xml
andhttp4k-format-xml
modules. - (Rename) Break:
GenerateXmlDataClasses
filter inhttp4k-format-xml
is nowGsonGenerateXmlDataClasses
- Removed superfluous
CatchLensFailure
filter fromhttp4k-contracts
module. This is not required as lens failures are already handled by the main contract handler.
- Moved Jackson XML support to new module
http4k-format-jackson-xml
. Note that this is for auto-marshalling of data-classes only and does not expose an XML DOM model.
- Deprecated
Body.view()
lens construction in favour of aBody.viewModel()
call which removes the implicitly calledtoLens()
. This allows further mapping from oneViewModel
type to another, and brings the view lens construction into line with the rest of the extension functions onBody
. - Add auto-marshalling XML support to
http4k-format-jackson
module. - Upgrade deps.
- Add
UpstreamRequestFailed
exceptions andHandleUpstreamRequestFailed
filters tohttp4k-cloudnative
. These allow apps to neatly deal with upstream failure in a sensible way.
- Tweak
contract()
DSL to add remaining options for configuration.
- Renamed
ChaosControls
(deprecated) toChaosEngine
.
- Added new templating module
http4k-templates-freemarker
. H/T @amcghie for the PR implementing this http4k-contract
has a new DSL for construction of the contract which replaces the old one (now deprecated). This is consistent with themeta
DSL used to construct individual contract routes and avoids repetition of the old API. We attempted to implement the standard replace-with deprecation, but IntelliJ didn't like it (too complex maybe), so we've hard coded the warning instead which code which should work.- Added
PreFlightExtraction
to contract module, which adds the ability to disable body-checking for contract routes. This will allow refining of routes or entire contracts to be more efficient. - Upgrade deps.
- Fix #217 - Cannot override the definitionId of a top-level array in OpenAPI
- Upgrade deps
- Chaos now do not blat
x-uri-template
when used with aRoutingHttpHandler
- Simplified usage of
Once
chaos trigger. - (Slight break) Consistentified (!) construction of Chaos Behaviours, Stages and Triggers. Replaced
singletons with function calls. Eg.
Always -> Always()
- (Possible Break): Fix #215 -
LensFailure
does not always include target object. Only change to the API is thatIN
generic in Lenses is now bounded byIN : Any
. This fix is a actually internally consistent as we could not always include the target otherwise (which is anAny?
). - Trim leading and trailing whitespace from extracted
EnvironmentKey
values. - Secret value is now only usable once via the
use()
function. - Upgrade to various deps.
- Removed deprecations.
- Added some common types for Environmental setup, and equivalent BiDiLens mappings
- Handle null response in Java Http client. H/T @FredNordin
- Fix #212 - allow null values in HTTP contract definitions. This does mean we lose the type definition for that field, but we don't blow up silently (which was the previous behaviour). H/T @xhanin
- Re-add
Path.nonEmptyString()
which was accidentally removed.
- Add support for prohibiting String unmarshalling in JSON auto-marshalling configuration.
- HTTP Contracts now use the underlying
ContractRenderer
to produce the BadRequest and NotFound responses. MadeOpenAPI
open so that these responses can be customised.
- Add support for JSON views in
Jackson
module. H/T @xhanin for the donkey work.
- Breaking: slight rearrangement of RouteMeta
receiving/returning
methods to provide consistency when defining route contracts.
- Moved the set of predefined String
BiDiMapping
instances to their own class. Bulked out the auto-mapping configuration options.
- Upgrade to various deps.
- Extracted out new
BiDiMapping
type, which encapsulates string <-> type conversions and removes a boatload of duplications. These conversions are now used consistently across all the various places (Lenses, auto-mapping). - Improved configurability of
AutoMarshallingJson
instances.
- Upgrade to various deps.
- Fix #208 - Xml auto deserialisation incorrectly converting strings to numbers
- Fix #207 - repeating prefixes in static routes are not handled correctly. H/T @ruXlab for the PR to fix.
- Add
http4k-server-ktorcio
server backend. Note that whilst this module does allow http4k apps to plug into the Ktor-CIO engine, it does not provide fully front-to-back coroutine support.
- Preventing FallbackCacheControl from duplicating existing headers. H/T @leandronunes85
- Breaking: Make
Body.length
nullable instead of throwing exception when value is not available. H/T @zvozin
- Upgrade to various deps.
- Add session token support to AWS filter, and "credentials provider" to allow for rotating AWS sessions. H/T @dhobbs.
- Breaking: Moved WsClient from
org.http4k.testing
toorg.http4k.websocket
.
- Fix
access-control-allow-origin
returned when server supports multiple origins H/T @johnnorris
- (Properly) Fix #198 - Rewrote OpenApi contract to ensure it stays fixed. H/T @reik-wargaming for the help in tracking this down.
- "Fix" #198 - Breaking change made in
http4k-contracts
to clarify/deconfuse API. Hidbody
parameter in contract route meta DSL - it is nowreceiving()
. - Upgraded some dependencies, including Gradle to v5.0.
- Breaking: Resilience4j dependency upgrade causes a break when providing custom config. Simply insert the Config type generic to fix:
e.g.
RetryConfig.custom()
->RetryConfig.custom<RetryConfig>()
- Fix #197 - Swagger spec for form fields had incorrect description.
- Introduce interface for Environment
- Upgrades to dependencies
- Improved Client-side HTTP status descriptions
- Lenses now support Durations out of the box
- Environments now support multi-value keys (comma separated)
- Make
Undertow
API friendlier - Fix to JsonReadinessCheckResultRenderer to actually implement the correct interface
- Enhancement of
http4k-cloudnative
- now supports extra-health check routes, and provide way to load app configuration via Properties files.
- Add filter allowing Gzipping based on an allowed set of content types. H/T @jshiell
- Change HttpHandler extending HttpClients to use
object invoke()
mechanism, as the individual clients have no visible API surface of their own. IntroducedDualSyncAsyncHttpHandler
interface.
- Webdriver checkbox handling improved. H/T @gypsydave5
- upgrade to various versions
- upgrade to Kotlin 1.3.0
- Tweak to K8S port variables.
- (Unlikely break): Change
Http4kServer
interface to returnUnit
fromstop()
. This affects all server implementations. - Added DSL function for working with JSON objects (scopes JSON as
this
).fun <T> Json<NODE>.invoke(Json<NODE>.() -> T)
- New module
http4k-cloudnative
contains classes to help run http4k services inside cloud-native environments, including K8S. - Upgrade some dependencies
- Deprecation: Moved
Header.Common
fields to mainHeader
object. Extension properties should go there now.
- Use UTC when checking cookie expiry
- Deprecate String.toBody()
- Fix checkbox behaviour in webdriver
- Use Jetty latest release version (rather than RC one)
- Fix #189 - Uri toString now omits leading slash if the authority of a Uri is blank. This could be a potential break, but is actually more consistent as a Uri can currently be relative or absolute.
- Extend
SetBaseUriFrom
to support query parameters
- Added
SetBaseUriFrom
filter
- (Possible breaking change):
Json
is now only generified by a single type parameter instead of 2. For most usages, this type would have been identical anyway, but the upgrade of Argo has finally allowed the removal of this dead generic. Simply replaceJson<Node, Node>
withJson<Node>
. - Added Offset datetime types to all JSON auto-marshalling libraries
- Build logic for versioning is now in Kotlin. H/T @jmfayard for the PR
- Upgrade Kotlin, and various other dependencies
- Fix
withChaosControls
URL pattern so that it matches sub-routes ok on original handler
- Added
BearerAuth
andBasicAuth
implementations which populateRequestContexts
. Plus cookbook example :)
- Fix #177 - Make RequestContexts thread-safe.
- Upgrades to
http4k-testing-webdriver
. H/T @dickon for the PRs - Added
ProxyHost
request filter which is useful for writing proxy-type apps.
- Fix #168 - Fix rest of hamkrest matchers caused by generics mishap.
- Upgrade HTTP client dependency versions.
- Added
http4k-testing-chaos
module, designed to enhance failure-mode testing for http4k apps. Massive H/T to @IgorPerikov for the PR which drove this module's creation. - Added
http4k-incubator
module, for hosting developing projects and other code which might be promoted to top-level modules in the future.
- Fix #167 - Reintroduce
hasBody
compatibility with common matchers such ascontainsString()
- Remove deprecations.
- Fix #165 - AWS auth filter does not replace headers - it sets them (which breaks for request signing)
- Fix #164 - Webdriver internal state breaks when navigating to a full URL
- Fix #162 -
SetHostFrom
doesn't set 'Host' header correctly (missing port). H/T @elifarley
- Added some regex matchers to
http4k-testing-hamkrest
. - Added
BearerAuth
authentication Server and Client Filters - these work similarly toBasicAuth
. - Added option for
defaulted()
lenses to fall back to another supplied lens in the case of missing value. Thanks to @dmcg for the inspiration. :)
- Fix #160 -
JavaHttpClient
does not copy body stream correctly onto URL connection.
- Fix #159 - Contracts should not have Security applied to the description route by default.
- Fix #158 - Static and contract routes filters are applied in the wrong order.
- Add default SamplingDecision param to ZipkinTraces - defaults to always sample.
- Fix #150 - StaticRoutingHandler filters being called twice.
- Fix #151 - POTENTIAL BREAK: Rework of Status objects to fix equality against the Status constant
vals
when a description has been overridden. This involves the following potential breaking change: The Status class is no longer a data class to tighten up encapsulation - user calls to copy() will have to be replaced.
- Raise SO_BACKLOG in Apache and Netty server implementations.
- Add PERMANENT_REDIRECT and UNPROCESSABLE_ENTITY Status object.
- No change from 3.33.0. Previous version couldn't be made available to maven central.
- Add convenient way to extract from as a Map from http message. H/T to @dmcg (this version is available in jcenter only)
- Fix #142 - Pebble templates don't load from JAR files.
- Add support for propagation of the Zipkin x-b3-sampled header
- Changes to the Netty factory to enable running http4k on GraalVM. H/T @RichyHBM
- Allow all server implementations to start on port 0 (ie. find a free port) and then report it back as a part of the
Http4kServer
interface
- Make HTTP clients resilient to unknown host and connection refused exceptions
- Implemented #134 - Added default (de)serialization for common JDK primitives to all Auto-marshalling JSON modules - eg. date times and UUIDs
- Fix #131 - Uri's created with paths that don't contain leading slashes.
- Added etag parser filter. H/T @dgliosca for the PR
- Fix #132 - Ensured that
disableDefaultTyping
is called in default Jackson implementation. This should be the default anyway, but has been added to ensure that we don't fall foul of CVE-2017-7525 and to surface awareness of this issue.
- OpenAPI now provides example values in the generated schema. H/T @skewwhiffy for the PR.
- Fix #126 - ResourceLoadingHandler can expose mapped resources into the root. <-- We think this is an important update, so please upgrade!
- Fix #125 - ApacheServer implementation now sets content length if present.
- Fix #123 - Multipart Body objects blow up when parsed after being debugged. As with all streams, care should be taken to not blow heap when internalising them for debugging purposes.
- Debugging filter now supports ignoring Multipart streams.
- Tweak: OpenAPI now doesn't return null values in the schema.
- Fix #124 - headers in WebSocket upgrade request are incorrectly joined.
- Removed
supportedContentTypes
field from OpenApi contract JSON, since this is a legacy field.
- Added option to Undertow to enable HTTP2 from main ServerConfig
- Upgrade various dependencies for Java 10 compatibility. H/T @tom
- Fix bug with repeated params in Websocket upgrade request. H/T @tom
- Composite LensFailures now capture (at least) the first failing cause (probably the body parameter in the case of an
http4k-contract
module.
- Fix #116 - Can provide a custom Response creation method for
CatchLensFailure
. H/T @elifarley for the inspiration!
- Added singleton method for Json.array, since if you pass in a single JsonNode (Jackson), it accidentally iterates over the fields in the node instead of using the object as an entry in the array.
- Fix #115 - Only add content-length for methods that allow content in AwsAuth filter
- Preserve routing information on request/response manipulation
http4k-security-oauth
module added - with support for OAuth2 Authorization Grant flow- Replaced classes reliant on
javax.activation
package, which allows Java 9+ to not require any external dependencies. \o/ - Fix #112 -
ApacheClient
incorrectly sets headers on GET requests (this breaks F5 load balancers). H/T @simojenki - PR #110 - Websocket client timeouts are incorrectly translated as seconds instead of millis. HT @anorth
- Core
JavaHttpClient
does not support streaming due to limitations withHttpURLConnection
- Fix #109 - Jackson treats integer values inconsistently, leading to matching errors when using hamkrest.
- Fix #107 - Killed the x-uri-template header and fixed the ReportHttpTransaction to have access to the
routingGroup
. - Altered ordering of filters in
http4k-contract
so that the route is identified before pre-filters and security are applied. This allows knowledge of the path to be accessible at the time of application of those filters.
- Introduce JavaHttpClient to
http4k-core
. It provides a very basic http client without any other 3rd party dependencies.
- PR #104 - Add optional time/date formatters to LensSpecs so you can choose you serialisation format. H/T @elifarley
- Fix #105 - Swagger API json file: duplicate key in "definitions".
- Fixed PR #100 - URI template regex required extra escaping. This only affects Android deployments as IDE shows the regex escaping is redundant. H/T @privatwolke
- Breaking: converted contract pre-security filter to be a post-security filter. This means that all standard filters are applied before the security later, which allows for logging and monitoring and context setup. The previous filter mechanic applied security first, which didn't allow for this. In the unlikely event that post-security filters still need to be applied, use the
withPostSecurityFilter()
function when building the contract. - Docs for contract RouteMeta function parameters, and deprecated some unused functions (missed when we introduced the DSL).
- PR #99 - Contract routes now support up to 10 path segments. Thanks to @scap1784 for the PR! :)
- Fix #97. Moshi does not fail when deserialise non-nullable fields correctly. Note that GSON still suffers from this problem
- Added a pre-security filter option to contract creation, so that you can explicitly specify behaviour to occur before security kicks in.
- Convert
Security
(from sealed class) andApiKey
to be interfaces. This allows users to implement their own security models.
- Introduce
HttpTransaction
and newReportHttpTransaction
filter provide better generic API for reporting, along with the ability to label transactions for this purpose. - Breaking: Rework the metrics request counter and timer Filter API. There is now a
HttpTransactionLabeller
for you to add as many labels as required to the transaction. Each of these labels will be used to tag the metric.
- Fix #95 - Filters are now applied to "route not found" responses
- Fix #93 - Apache server doesn't like content-length or transfer-encoding headers present in http4k response.
- Add ability to "name" input and output contract body definitions in an OpenAPI JSON doc. This applies to only the top level entity. If no override is passed, the objects are named according to their hashcode.
- Fix #92 - cookie date should always use US locale
- Further tweak to Netty. H/T @FredDeschenes
- Fix #91 - large message handli ng in Netty
- Upgrade to Kotlin 1.2.20
- Support for
operationId
in OpenApi route metadata. H/T @danschultz for the PR. - Removed previously deprecated methods.
- New client module
http4k-client-jetty
, which supports both sync and async models.
- Fix #84. OPTIONS requests are not detected by contract routes.
- Added option to NOT authorise OPTIONS requests in ApiKey security filter.
- Added support for Async HTTP clients and added new
AsyncHttpClient
interface, which is obviously used for HTTP clients only**, and not server-side calls. :) - New client module
http4k-client-apache-async
. - New metrics gathering module
http4k-metrics-micrometer
. Big H/T to @kirderf for the PR. - Added support for async to
OkHttp
client module.
- P/R 81 - adding headers and timeout to websocket client.
- Added compactify and prettify to Json implementations
- Added
Json.hasBody
Hamkrest matchers for comparing bodies. Note these are extension methods and need to be referenced/imported as such.
- Added facility for non-blocking websocket client to react to onConnect event. This API is the same as the inbound, server-side API - ie. there are no explicit connection event handlers. H/T @tom for the idea.
- P/R #13 Create extension methods for Response to add caching headers. H/T @k0zakinio.
- Fix #78. Serialisation of raw lists using Moshi fails in the same way as the Jackson auto-conversions do. Added convenience methods to get around this.
- Added
http4k-format-moshi
to support the Square auto-marshalling library.
- Fix #76 - encoding of path segments to use URI encoding instead of URL form encoding.
- Added support for multiple HotReload template directories in
HandlebarsTemplates
. H/T @TomShacham - Fix #74 - Request tracing span/parentSpan set too early so was shared between outgoing requests.
- New server backend
http4k-server-apache
. H/T @kirderf for the PR :) - We now set the length of the incoming request body when it is available in the incoming request.
- Handlebars now uses combination of Class and Template name to cache templates.
- Facility to compose
TemplateRenderers
withthen()
to provide fallback behaviour.
- PR #70: Header order equality for Request/Response - H/T @gypsydave5.
- Switched out
Status
forWsStatus
(with proper RFC code set) in Websockets.
- Typesafe Websockets! Jetty now supports websockets, using the same style of API in the main http4k routing.
- (Possible) Breaking change: Because
WsHandler
(typealias) implements the same inbound interface asHttpHandler
, you now cannot declareHttpHandlers
without specifying the input type, so any "anonymous" handlers will not compile as a result. The required fix is very simple, but manual: `{ Response(OK) } should become { _:Request -> Response(OK) }
- Fix Request.form() for streaming requests
- Remove possibility of empty message for Path Lens failure.
- New (better!) API for
http4k-contract
module. Old meta DSL has been deprecated.
- Fix #63 - Apache Client Connect. timeout exception handling.
- Added
http4k-serverless-lambda
module, allowing http4k applications to be deployed into AWS Lambda and then called from API Gateway. Effectively, the combination of these two services become just another Server back-end supported by the library. \o/
RequestContextKey
now follow the standardised Lens structure of required, optional, defaulted, and can now be removed (set to null). Replace calls toRequestContextKey.of()
withRequestContextKey.required()
- Removed previously deprecated values. See below for details on replacements.
- Added
http4k-resilience4j
module, which adds Circuits, RateLimiters, Retrying and Bulkheading. - Fix #60 (H/T @michaelhixson for the spot).
- Added a couple of useful
ServerFilters
. - Upgrade various dependency versions.
- Tidying of Multipart code.
- Fix #57. Static handlers behave oddly when combined with an HTTP verb in the routing tree.
- Fix #56. Altered behaviour of
CatchLensFailure
to NOT catch errors from unmarshalling Response objects. This was causing BAD_REQUEST to be incorrectly generated. - Simplification of generics around LensSpecs. This should not be a breaking change, (there were 3 generics, now the MID has been removed so there are just 2) but could break if signatures are used explicitly.
- Reordered generics in LensInjector to make sense. This should have no effect on most code-bases, but could break if signatures are used explicitly. Just flip the generic types to switch.
- Added support for unsigned AWS requests, which enables streaming content to S3.
- Added
BodyMode.Request
to configure streaming for clients. ResponseBodyMode
is nowBodyMode.Response
(Breaking change. Fixable with simple find/replace).
- Added
ServerFilter.ProcessFiles
filter to stream Multipart Files, convert them into references and replace inline in the Form.
- Avoid realising StreamBody unless necessary, which could break common usages of streaming.
- Tweaks to Server backends to improve efficiency.
- Webdriver will keep only the final URI after redirects.
- Increased granularity of
Replay.DiskStream
and ensure that traffic is returned in exact order on all OSes. - Add support for redirects to Webdriver.
- Multipart module tweaked to provide a more consistent API.
- Fix FollowRedirects for POST/PUT request.
- Multipart form support through new module
http4k-multipart
. - Deprecation: Replaced
Swagger
withOpenApi
and deprecated the former (via typealias). - Deprecation: Replaced
FormValidator
withValidator
and deprecated the former (via typealias).
- Refactor release.
- Fix #50 - Webdriver does not normalise relative links correctly.
- Http client modules now catch and convert Socket Timeout exceptions to HTTP 504s (with a custom message)
- Tweaks to how recorded traffic is stored on disk. Thanks to @dkandalov for the PR around this.
- Added
TrafficFilters
for recording and replaying HTTP traffic. Seeorg.http4k.traffic
package for details.
- Added
http4k-template-dust
for Dust template engine support. Thanks to @npryce for the PR to add this.
- Fix #44 - Use quotes around cookie values
- Raise proper Exception (instead of LensFailure) when RequestContexts are not set up correctly, so we don't accidentally classify developer errors as BadRequests
- Added facility to assign values into a
RequestContext
which is passed down the Filter chain.
- Fix #44 - Request cookies should not be wrapped in quotes.
- Fix #43 - AWS does not sign binary requests correctly.
- Fix #41 - Sending binary body alters the size of the payload.
- Added "catch all" routing option, which matches all methods to a handler.
- Fix #40 - GZip filters now use content-encoding headers instead of transfer-encoding.
- Fix #39 - ResponseBodyMode.Memory properly closes streams (breaks jetty + gzip).
- Ensure that streams are closed properly when consuming from an upstream client.
- Remove Apache client request streaming because it may not release connections properly.
- Add streaming support to HTTP Server and Client modules.
- Remove CatchLensFailure ClientFilter as it will never be used.
- Added CatchLensFailure for ClientFilters - which catches un-deserializable invalid responses from clients and generates a BAD_GATEWAY error.
- Switch XML generation to Gson over Jackson because Jackson doesn't handle uppercase field names well.
- Switch native XML parsed type to Document over Node.
- New algorithm for XML data class deserialisation, so un-deprecated XML methods.
- Deprecated methods in XML support due to limitation with underlying Jackson implementation.
- Fixed bug with GenerateXmlDataClasses filter
- Renamed
http4k-format-jackson-xml
module tohttp4k-format-xml
. - Improved XML unmarshalling support.
- Fixed 36: Form entry is too strict with content encoding.
- Added
http4k-format-jackson-xml
module, with XML parsing support. - Upgrade several dependencies
- Fixed Hamkrest matchers to be on HttpMessage and not Http Request.
- Default body Content Negotiation strategy changed to None
- Converted Content-Negotiation strategy from an Enum to an interface, so that users can define their own strategies. We also now check encoding so there are 4-built in strategies to choose from: Strict, StrictNoDirective, NonStrict and None.
- Fixed #31 - Matching of segments in URIs is done after URLs are decoded, which results in not capturing encoded slashes in the path segments.
- Fixed #30 - CachingClasspath template ResourceLoader not working with non-root packages.
- Fixed #29 - webdriver submission of text area.
- Http clients now use a new instance of the default for each instantiation. Previously there was a shared instance.
- Add regex body type for parsing values out of bodies, and "None" option for content negotiation.
- Fix AWS request signing for requests containing empty path
- Fix AWS request signing for requests containing path with special characters
- Added support for newRequest() in new
RouteBinder
mechanic.
- Add support for unlimited nesting for
routes()
blocks. Removed the rawRoute
object, which can be replaced withRouter
orRoutingHttpHandler
where appropriate. - As part of above, rejigged route setup logic. Deprecated old routing structure, so now
"/path" to GET bind
is"/path" bind GET to
. To fix deprecation, simply switch the calls to "to" and "bind" in routing setup. - Rename of
bind()
inhttp4k-contract
to bebindContract()
- Added missing eclectic HTTP method. :)
- Added GZip filters to
http4k-core
to zip request and response bodies.
- Improved messages for
http4k-testing-hamkrest
matchers.
- Added
http4k-testing-hamkrest
which contains a set of Hamkrest matchers for Http4k objects.
- More features for
http4k-testing-webdriver
. Cookie support added.
- More features for
http4k-testing-webdriver
. We now support Form entry and submission.
- More features for
http4k-testing-webdriver
.
- Added
http4k-testing-webdriver
module, an ultralight Selenium WebDriver for http4k apps
- Fix #26 - GenerateDataClasses does not recurse into nested object trees
- Fix filter application on GroupRoutingHttpHandler to apply the filter when it is applied with
then(RoutingHttpHandler()
- Fix static routes not defaulting to index.html when in root context
- Added
SunHttp
server implementation (for development use only)
- Fix cookie parsing when value contains '='
- Add method to set form values in the request
- Added PURGE HTTP method as it's used commonly by various caches.
- Repackage AWS classes for consistency with rest of project
- Alter AWS Auth filter creation. Now use
ClientFilters.AwsAuth
- Add AWS module
- Newly created Zipkin traces are now populated onto incoming request in ServerFilters.
- Slight tweak to GSON auto-marshalling to allow for use of raw Arrays with auto-marshalling
- Add
Thymeleaf
templating support
- Add
Pebble
templating support
- Make Route a Router so we can nest them together.
- Remove excess "charset" from headers in Undertow.
- Rename
by()
tobind()
in routing for clarity.
- Fix for #24 - UriTemplate captures query parameters when the trailing path parameter is a regex.
- Added GSON full-auto functions to convert arbitary objects to/from JSON.
- Fix #23. Contract now supports multi-part URL params (for hardcoded parts)
- Fix #22. Uri template does not parse out correct path params when URL starts with a path part.
- toString() implementations to aid debugging
- Readded missing default parameter for
newRequest()
on RouteSpec
- Breaking: Inversion of routing API.
GET to "/someUri"
is now"/someUri" to GET
for consistency across the entire API.
- Reimplementation of
http4k-contract
API to match main routing API. Contracts are now nestable.
- Fix Filters being applied twice in
ContractRoutingHttpHandler
- More work on
http4k-contract
contract API
- Rework
http4k-contract
routing to be mounted in the same way as otherRoutingHttpHandlers
- Filters are now applied consistently to all Routers
- Tweak to DSL for defining StaticRouters
- Fix for #18: FollowRedirect will now work if location header includes charset information.
- New DSL for defining StaticRouters
- Merged StaticContent and StaticRouter and repackage of contract API into other packages
- Extend fix for #17 to request
Cookie
header.
- Fix for #17. Cookie can now parse a cookie without attributes and ending in semicolon.
- Added nestable Routers.
- Merging of Modules and Routers.
Router
is the newModule
!RouteModule
is nowContractRouter
, so rename in code will be required.
- Fix for #15. OkHttp client handling of POSTs with no body.
- Can add custom mime types to Static Content
- GenerateDataClasses is capable of more complex object graphs
- Remove
HttpHandler.asServer
in favour ofHttpHandler.startServer
to avoid confusion. - Introduce
Status.description()
.
- Netty sets content-length header.
- Fix for #12. Undertow not constructing response correctly.
- New module with Undertow.io support
http4k-server-undertow
- Jackson implementation now ignores unknown properties in incoming messages
- Netty implementation tidied up
- Fix for #11. Netty implementation returns incorrect status codes.
- Add synonym methods for Lenses to aid readability. We now have
invoke(IN)/extract(IN)
and `invoke(IN, TARGET)/inject(IN, TARGET)
http4k-contracts
: Add option to change the route of the module description route
http4k-contracts
: Fix for contract module description routes not being authenticated via security filter
http4k-contracts
: AddSwagger
module rendering with JSON schema models for messages.
- Add
nonEmptyString()
lens type to all request parts.
- General rework
- Further work on Path Lenses. They are now fully supported and consistent for both simple and contract routing scenarios.
- Path lenses are now bidirectional, so can be used to populate requests as well as bodies an headers etc.
- Routes can now create shell Requests for themselves, using
route.newRequest()
- Body is now non-nullable (use
Body.EMPTY
instead) - Rename methods
BodyLens
API for consistency and clarity.required()
is nowtoLens()
.to()' binding method is now
of().
- New client module:
http4k-client-okhttp
- Tidying
- Added option for Body content-negotiation to be strict or non-strict (the default). Always be strict in what you send, relaxed in what you will accept. :)
- Moved
Credentials
toorg.http4k.core
package. - Add various filters, including
SetHostFrom
andCatchAll
.
- Added
GenerateDataClasses
so you can generate Kotlin data classes from JSON messages.
- Added CORs support
- Added auto() to Jackson, so you can auto convert body objects into and out of Requests/Responses
- Added CachingFilters
- Removed static factory methods for Request/Response. They were confusing/incomplete and users can easily recreate them via extension functions.
- Merge
org.http4k.core.Body
andorg.http4k.lens.Body
. - Add Request/Response message parsers.
- Turn Body into ByteBuffer wrapper rather than typealias. That should make .toString() behave as most people would expected.
- Removed non-mandatory parameters from Request and Response constructors. This is aid API clarity. and force users to use the API methods for properly constructing the objects.
- Regex Lens added.
- Initial major release.