retrofit.http
Annotation Type Body


@Target(value=PARAMETER)
@Retention(value=RUNTIME)
public @interface Body

Use this annotation on a service method param when you want to directly control the request body of a POST/PUT request (instead of sending in as request parameters or form-style request body). If the value of the parameter implements TypedOutput, the request body will be written exactly as specified by TypedOutput.writeTo(java.io.OutputStream). If the value does not implement TypedOutput, the object will be serialized using the RestAdapter's Converter and the result will be set directly as the request body.

Body parameters may not be null.

Author:
Eric Denman ([email protected])



Copyright © 2013 Square, Inc.. All Rights Reserved.