From 296e74aca76145e57896ff196da0cc83490c9206 Mon Sep 17 00:00:00 2001 From: Michal Kit Date: Thu, 29 Mar 2018 15:09:39 +0100 Subject: [PATCH] Adding the @Produces annotation for the GET endpoints in the Network Map service (#652) --- .../networkmanage/doorman/webservice/NetworkMapWebService.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/network-management/src/main/kotlin/com/r3/corda/networkmanage/doorman/webservice/NetworkMapWebService.kt b/network-management/src/main/kotlin/com/r3/corda/networkmanage/doorman/webservice/NetworkMapWebService.kt index 41ab0f43a2..06a16e19e9 100644 --- a/network-management/src/main/kotlin/com/r3/corda/networkmanage/doorman/webservice/NetworkMapWebService.kt +++ b/network-management/src/main/kotlin/com/r3/corda/networkmanage/doorman/webservice/NetworkMapWebService.kt @@ -115,10 +115,12 @@ class NetworkMapWebService(private val nodeInfoStorage: NodeInfoStorage, } @GET + @Produces(MediaType.APPLICATION_OCTET_STREAM) fun getNetworkMap(): Response = createResponse(currentSignedNetworkMap, addCacheTimeout = true) @GET @Path("node-info/{nodeInfoHash}") + @Produces(MediaType.APPLICATION_OCTET_STREAM) fun getNodeInfo(@PathParam("nodeInfoHash") nodeInfoHash: String): Response { // Only serve node info if its in the current network map, otherwise return 404. logger.trace { "Processing node info request for hash: '$nodeInfoHash'" } @@ -134,6 +136,7 @@ class NetworkMapWebService(private val nodeInfoStorage: NodeInfoStorage, @GET @Path("network-parameters/{hash}") + @Produces(MediaType.APPLICATION_OCTET_STREAM) fun getNetworkParameters(@PathParam("hash") hash: String): Response { val signedNetParams = networkMapStorage.getSignedNetworkParameters(SecureHash.parse(hash)) logger.trace { "Precessed network parameter request for hash: '$hash'" }