enhancementhelp wanted
Repository metrics
- Stars
- (93 stars)
- PR merge metrics
- (PR metrics pending)
Description
This is probably a strange request for a strange API that takes nonstandard JSON that had to be specially formatted.
Following this stackoverflow question: http://stackoverflow.com/questions/30515068/send-json-raw-object-retrofit
public class TypedJsonString extends TypedString {
public TypedJsonString(String body) {
super(body);
}
@Override public String mimeType() {
return "application/json";
}
}
The API looks like this:
@POST("/fetch")
public abstract AvailableCampaigns sendDataAndFetchCampaigns(
@Retrofit.Header("User-Agent")
String userAgent,
@Retrofit.Query("Site_ID")
String siteID,
@Retrofit.Body
TypedJsonString data);
I tried to use a TypedJsonString as well as a plain String but the LoganSquareConverter doesn't know how to handle either one. I just want a string passthru into the body. Any suggestions on how to do this?
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.