Skip to content

Commit

Permalink
Merge branch 'master' of github.com:square/retrofit
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Aug 8, 2013
2 parents 989d69f + c2a85f8 commit c5124b4
Show file tree
Hide file tree
Showing 15 changed files with 48 additions and 9 deletions.
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Body.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -35,6 +36,8 @@
*
* @author Eric Denman ([email protected])
*/
@Target(PARAMETER) @Retention(RUNTIME)
@Documented
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface Body {
}
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/DELETE.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/** Make a DELETE request to a REST path relative to base URL. */
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@RestMethod("DELETE")
Expand Down
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -33,7 +34,9 @@
* <p>
* Field parameters may be {@code null} which will omit them from the request body.
*/
@Target(PARAMETER) @Retention(RUNTIME)
@Documented
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface Field {
String value();
}
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/FormUrlEncoded.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -29,6 +30,8 @@
* type. Field names and values will be UTF-8 encoded before being URI-encoded in accordance to
* <a href="http://tools.ietf.org/html/rfc3986">RFC-3986</a>.
*/
@Target(METHOD) @Retention(RUNTIME)
@Documented
@Target(METHOD)
@Retention(RUNTIME)
public @interface FormUrlEncoded {
}
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/GET.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/** Make a GET request to a REST path relative to base URL. */
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@RestMethod("GET")
Expand Down
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/HEAD.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/** Make a HEAD request to a REST path relative to base URL. */
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@RestMethod("HEAD")
Expand Down
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Header.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -36,7 +37,9 @@
*
* @author Adrian Cole ([email protected])
*/
@Retention(RUNTIME) @Target(PARAMETER)
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
public @interface Header {
String value();
}
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Headers.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down Expand Up @@ -42,7 +43,9 @@
*
* @author Adrian Cole ([email protected])
*/
@Target(METHOD) @Retention(RUNTIME)
@Documented
@Target(METHOD)
@Retention(RUNTIME)
public @interface Headers {
String[] value();
}
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Multipart.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -25,6 +26,8 @@
* Denotes that the request body is multi-part. Parts should be declared as parameters and
* annotated with {@link Part @Part}.
*/
@Target(METHOD) @Retention(RUNTIME)
@Documented
@Target(METHOD)
@Retention(RUNTIME)
public @interface Multipart {
}
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/POST.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/** Make a POST request to a REST path relative to base URL. */
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@RestMethod(value = "POST", hasBody = true)
Expand Down
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/PUT.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/** Make a PUT request to a REST path relative to base URL. */
@Documented
@Target(METHOD)
@Retention(RUNTIME)
@RestMethod(value = "PUT", hasBody = true)
Expand Down
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Part.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand Down Expand Up @@ -45,7 +46,9 @@
* <p>
* Part parameters may not be {@code null}.
*/
@Target(PARAMETER) @Retention(RUNTIME)
@Documented
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface Part {
String value();
}
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Path.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -32,7 +33,9 @@
* <p>
* Path parameters may not be {@code null}.
*/
@Retention(RUNTIME) @Target(PARAMETER)
@Documented
@Retention(RUNTIME)
@Target(PARAMETER)
public @interface Path {
String value();
}
5 changes: 4 additions & 1 deletion retrofit/src/main/java/retrofit/http/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Expand All @@ -32,7 +33,9 @@
* <p>
* Query parameters may be {@code null} which will omit them from the URL.
*/
@Target(PARAMETER) @Retention(RUNTIME)
@Documented
@Target(PARAMETER)
@Retention(RUNTIME)
public @interface Query {
String value();
}
2 changes: 2 additions & 0 deletions retrofit/src/main/java/retrofit/http/RestMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
*/
package retrofit.http;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Documented
@Target(ANNOTATION_TYPE)
@Retention(RUNTIME)
public @interface RestMethod {
Expand Down

0 comments on commit c5124b4

Please sign in to comment.