我的Lambda处理程序如下所示:
override def handleRequest(inputStream: InputStream, outputStream: OutputStream, context: Context): Unit = {
val mapper = new ObjectMapper() with ScalaObjectMapper
mapper.registerModule(DefaultScalaModule)
val mapped = mapper.readValue(inputStream, classOf[RequestSchema])
println("Path: \n")
println(mapped.path)
inputStream.close()
}
case class RequestSchema(path: String)
path
在即将到来的请求的有效负载中。但是,当我将其打印出来时,我得到的是null。知道如何提取path
字段吗?