@Retention(value=RUNTIME)
@Target(value=PARAMETER)
public @interface BodyParam
Parameter to be sent as the body payload.
If the parameter type extends InputStream, this payload is streamed to server through
"application/octet-stream". Otherwise, the body is serialized first and sent as
"application/json" or "application/xml", based on the serializer.
Example 1: put JSON
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}")
VirtualMachine createOrUpdate(@PathParam("resourceGroupName") String rgName, @PathParam("vmName") String vmName, @PathParam("subscriptionId") String subscriptionId, @BodyParam("application/json") VirtualMachine vm);
Example 2: stream
@POST("formdata/stream/uploadfile")
void uploadFileViaBody(@BodyParam("application/octet-stream") FileInputStream fileContent);