can anyone guide me how to send PUT request with this json
{
"delivery_status": "Partially Completed",
"signatures": "==skdjfkjdsakjhfoiuewyrdskjhfjdsaf",
"assignee_note": "this is remarks and and and nothing",
"id": "this is remarks and and and nothing",
"returned_products": [
{
"id": "18",
"quantity": 3,
"reasons": "i dont know reason .. bus wapis a gya saman :-)"
},
{
"id": "19",
"quantity": 4,
"reasons": "i dont know reason .. bus wapis a gya saman :-)"
}
]
}
here is what i have tried but failed
@FormUrlEncoded
@PUT("delivery_notes/update/1.json")
Call<UploadDeliveryNote> postDeliveryNote(
@Field("returned_products[]") ArrayList<ReturnedProduct> returned_products,
@Field("delivery_status") String deliveryStatus,
@Field("signatures") String signatures,
@Field("id") String id,
@Field("assignee_note") String note
);
but failed then tried this.
@Headers("Content-Type: application/json")
@PUT("delivery_notes/update/1.json")
Call<UploadDeliveryNote> postDeliveryNote(@Body String body);
what am i doing wrong in this?
my main problem is i am sending simple strings and one object of model is a list of models returned_products
Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…