The mail request I need to do should look like this
{
"project": {
"name": "newname123",
"identifier": "id55"},
"key":"8f583ad25100575b974062e0cee43e47aa158e4e"}
I was able to send it to the server using a raw implementation in Postman, but I don’t know how to send the same using form data
Here is my interface
@FormUrlEncoded
@POST("projects.json")
Call<Project> CreateProject(@Field(value = "project") ProjectToSend project,
@Field("key") String key);
Regardless of whether I try to do this with @body or @field, this does not work.
Class ProjectToSend
public class ProjectToSend {
private String name;
private String identifier;
public ProjectToSend(String name, String identifier) {
this.name = name;
this.identifier = identifier;
source
share