I used Spring Boot to implement a REST application. I have one resource that is mapped like this
@RequestMapping(value = \"/{fromLat}/{fromLon}/{toLat}/{toL
Did you try to set:
1) Content-Disposition: inline; -> you can use:
return new ResponseEntity(body, headers, statusCode); and set Content-Disposition in headers. Look here: How to set 'Content-Disposition' and 'Filename' when using FileSystemResource to force a file download file? and Return a stream with Spring MVC's ResponseEntity
2) text/x-json - Experimental MIME type for JSON before application/json got officially registered.
@RequestMapping(value = "/{fromLat}/{fromLon}/{toLat}/{toLon:.+}", method = {RequestMethod.GET},
produces = {"text/x-json"})
It will try to display the content instead of downloading it.
Hope it will help.