Retrofit进行post提交json数据

定义api


image.png

对象转成jsonstr然后body传参


image.png

引入retrofit相关依赖

com.squareup.retrofit2
retrofit
2.4.0


com.squareup.retrofit2
converter-jackson
2.4.0

你可能感兴趣的:(Retrofit进行post提交json数据)