Skip to content

Commit

Permalink
make objectmapper plugable
Browse files Browse the repository at this point in the history
  • Loading branch information
mduesterhoeft committed Feb 21, 2019
1 parent b3b8b78 commit be5e8be
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ bin/
.project
.classpath

*.iml
.idea/
out/

Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/com/github/mduesterhoeft/router/ApiRequest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ package com.github.mduesterhoeft.router
.firstOrNull { it.key.toLowerCase() == httpHeader.toLowerCase() }
?.value
}

public fun getHeader(httpHeader: String) = getHeaderCaseInsensitive(httpHeader)
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import kotlin.reflect.jvm.reflect

abstract class RequestHandler : RequestHandler<ApiRequest, ApiResponse> {

val objectMapper: ObjectMapper = jacksonObjectMapper()
open val objectMapper = jacksonObjectMapper()

override fun handleRequest(input: ApiRequest, context: Context): ApiResponse? {
log.info("handling request with method '${input.httpMethod}' and path '${input.path}' - Accept:${input.acceptHeader} Content-Type:${input.contentType} $input")
Expand Down

0 comments on commit be5e8be

Please sign in to comment.