1.Retrofit+OKHttp POST JSONArray怎么請(qǐng)求??
1 回答

富國(guó)滬深
TA貢獻(xiàn)1790條經(jīng)驗(yàn) 獲得超9個(gè)贊
/* 添加評(píng)論 */
@POST("api/Comment")
@Headers({"Content-Type: application/json;charset=UTF-8"})
Observable<ApiResponseBean> postComment(@Body RequestCommentBean commentBean);
new Retrofit.Builder()
.baseUrl(API_BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
直接用gson,把實(shí)體自動(dòng)轉(zhuǎn)json然后上傳吧。
添加回答
舉報(bào)
0/150
提交
取消