Good day.
I have an Android form in which in one of the fields I select a date, this data is sent by the method POST
, for this I am using retrofit
, but this date I must serialize it or convert it to this format:
yyyy-MM-dd'T'HH: mm: ss
.
The Post
method is like this:
@FormUrlEncoded
@POST("api/books/{bid}/books")
Call<Book> postBook(@Path("bid") String bookId,
@Field("bookRequest[additionalComment]")
String additionalComment,
@Field("bookRequest[contactPhone]") String contactPhone,
@Field("bookRequest[suggestedDate]") String date);
How could I solve this situation? Thank you in advance.