mirror of https://github.com/apache/jclouds.git
modified all binders from request.getPayload().setContentType() to request.getPayload().getContentMetadata().setContentType()
This commit is contained in:
parent
f02607fc0b
commit
b0e2085659
|
@ -56,7 +56,7 @@ public class BindChecksumsToJsonPayload extends BindToStringPayload {
|
|||
builder.deleteCharAt(builder.length() - 1);
|
||||
builder.append("}}");
|
||||
super.bindToRequest(request, builder.toString());
|
||||
request.getPayload().setContentType(MediaType.APPLICATION_JSON);
|
||||
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
}
|
|
@ -36,7 +36,7 @@ public class BindClientnameToJsonPayload extends BindToStringPayload {
|
|||
@Override
|
||||
public void bindToRequest(HttpRequest request, Object payload) {
|
||||
super.bindToRequest(request, String.format("{\"clientname\":\"%s\"}", payload));
|
||||
request.getPayload().setContentType(MediaType.APPLICATION_JSON);
|
||||
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BindGenerateKeyForClientToJsonPayload extends BindToStringPayload {
|
|||
public void bindToRequest(HttpRequest request, Object payload) {
|
||||
super.bindToRequest(request, String.format("{\"clientname\":\"%s\", \"private_key\": true}",
|
||||
payload));
|
||||
request.getPayload().setContentType(MediaType.APPLICATION_JSON);
|
||||
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BindIsCompletedToJsonPayload extends BindToStringPayload {
|
|||
@Override
|
||||
public void bindToRequest(HttpRequest request, Object value) {
|
||||
super.bindToRequest(request, String.format("{\"is_completed\":\"%s\"}", value));
|
||||
request.getPayload().setContentType(MediaType.APPLICATION_JSON);
|
||||
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ public class BindNameToJsonPayload extends BindToStringPayload {
|
|||
@Override
|
||||
public void bindToRequest(HttpRequest request, Object payload) {
|
||||
super.bindToRequest(request, String.format("{\"name\":\"%s\"}", payload));
|
||||
request.getPayload().setContentType(MediaType.APPLICATION_JSON);
|
||||
request.getPayload().getContentMetadata().setContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue