Last active
November 24, 2015 13:30
-
-
Save kibotu/85edb5f7ea55f2298902 to your computer and use it in GitHub Desktop.
gson request methods annotation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.support.annotation.IntDef; | |
import com.android.volley.Request; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
@IntDef({ | |
Request.Method.DEPRECATED_GET_OR_POST, | |
Request.Method.GET, | |
Request.Method.POST, | |
Request.Method.PUT, | |
Request.Method.DELETE, | |
Request.Method.HEAD, | |
Request.Method.OPTIONS, | |
Request.Method.TRACE, | |
Request.Method.PATCH, | |
}) | |
@Retention(RetentionPolicy.SOURCE) | |
public @interface RequestMethod { | |
} | |
public Request<JSONObject> createJsonRequest(@RequestMethod final int method, @NotNull final String url, @NotNull String json, @NotNull final IResponse<JSONObject> callback, @Nullable Map<String, String> headerParams); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment