[英]How to post raw json below in the body of retrofit request?
在這里,我正在使用改裝1.9,我必須在發布請求中發布此json。
{
"note": "",
"amount": "0",
"frequency": null,
"patient": "sameer_998oiib@innotical.com",
"doctor": "",
"date": "2016-04-27",
"reminder":
[
{
"days": [2],
"time": "06:29:00"
},
{
"days": [2, 3],
"time": "06:30:00"
}
],
"salt": "Abobotulinum Toxin A Injection",
"method": 2,
"unit": 1
}
提前致謝。
只是創建一個像
public class PostObject{
String note;
String amount;
String frequency;
String patient;
String doctor;
String date;
String salt;
int method;
int unit;
List<Reminder> reminder;
class Reminder{
List<Integer> days;
String time;
}
}
並設置您的請求主體對象
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.