Skip to content

SpringBootMarcusChiu/http-message-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://www.javacodegeeks.com/2013/07/spring-mvc-requestbody-and-responsebody-demystified.html

I think Spring comes default with XML and JSON converter. Here in the basic Spring Boot Application we have create a custom converter for text/csv mime type

  1. start server mvn spring-boot:run

  2. curl -X PUT --header "Content-Type: text/csv" localhost:8080/bookcase -d '"123","Spring in Action"' curl -X PUT --header "Content-Type: text/csv" localhost:8080/bookcase -d $'"123","Spring in Action"\n"1234","Hello World"'

  3. curl -X GET --header "Content-Type: text/csv" localhost:8080/bookcase

About

converting objects to a specified format within the http response body

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published