Skip to content

Instantly share code, notes, and snippets.

@auryn31
Created July 10, 2019 21:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save auryn31/fb90a27e98e9e9afa8a8865ef80a93d8 to your computer and use it in GitHub Desktop.
Save auryn31/fb90a27e98e9e9afa8a8865ef80a93d8 to your computer and use it in GitHub Desktop.
@Controller
class RestEndpoint {
var streamResponse: CSVStreamResponseOutput
constructor(csvStreamResponseOutput: CSVStreamResponseOutput) {
this.streamResponse = csvStreamResponseOutput
}
@GetMapping(path = ["stream"], produces = [MediaType.APPLICATION_STREAM_JSON_VALUE])
@ResponseBody
fun getCSVAsStreamWithExtraEndpointForLocust(): StreamingResponseBody {
return streamResponse
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment