retrofit2.http.POST Java Examples

The following examples show how to use retrofit2.http.POST. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CollectApis.java    From Yuan-WanAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * 收藏列表下取消收藏
 * http://www.wanandroid.com/lg/uncollect/2805/json
 */
@POST("lg/uncollect/{id}/json")
@FormUrlEncoded
Observable<BaseResponse> unCollection(@Path("id") int id,//收藏在我的收藏列表的id
                                      @Field("originId") int originId);
 
Example #2
Source File: PersonApis.java    From Yuan-WanAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * 登陆
 * http://www.wanandroid.com/user/login
 */
@POST("user/login")
@FormUrlEncoded
Observable<BaseResponse<Login>> login(
        @Field("username") String userName,
        @Field("password") String password
);
 
Example #3
Source File: PersonApis.java    From Yuan-WanAndroid with Apache License 2.0 5 votes vote down vote up
/**
 * 注册
 * http://www.wanandroid.com/user/register
 */
@POST("user/register")
@FormUrlEncoded
Observable<BaseResponse<Login>> register(@Field("username") String username,
                                         @Field("password") String password,
                                         @Field("repassword") String rePassword//确认密码
);
 
Example #4
Source File: TestHttpClient.java    From beihu-boot with Apache License 2.0 4 votes vote down vote up
@POST(value = "/app/statistics/buyQuantity")
Call<TestHttpRs> test(@Body TestHttpDto testHttpDto);
 
Example #5
Source File: UploadService.java    From appcenter-plugin with MIT License 4 votes vote down vote up
@Multipart
@POST
CompletableFuture<Void> uploadApp(@Url @Nonnull String url, @Part @Nonnull MultipartBody.Part file);
 
Example #6
Source File: AppCenterService.java    From appcenter-plugin with MIT License 4 votes vote down vote up
@POST("v0.1/apps/{owner_name}/{app_name}/release_uploads")
CompletableFuture<ReleaseUploadBeginResponse> releaseUploadsCreate(
    @Path("owner_name") @Nonnull String user,
    @Path("app_name") @Nonnull String appName,
    @Body @Nonnull ReleaseUploadBeginRequest releaseUploadBeginRequest);
 
Example #7
Source File: AppCenterService.java    From appcenter-plugin with MIT License 4 votes vote down vote up
@POST("v0.1/apps/{owner_name}/{app_name}/symbol_uploads")
CompletableFuture<SymbolUploadBeginResponse> symbolUploadsCreate(
    @Path("owner_name") @Nonnull String user,
    @Path("app_name") @Nonnull String appName,
    @Body @Nonnull SymbolUploadBeginRequest symbolUploadBeginRequest);
 
Example #8
Source File: ApiService.java    From WanAndroid with MIT License 4 votes vote down vote up
@POST("user/login")
@FormUrlEncoded
Observable<LoginStateBean> userLogin(@Field("username") String username, @Field("password") String password);
 
Example #9
Source File: ApiService.java    From WanAndroid with MIT License 4 votes vote down vote up
@POST("user/register")
@FormUrlEncoded
Observable<LoginStateBean> userRegister(@Field("username") String username, @Field("password") String password, @Field("repassword") String repassword);
 
Example #10
Source File: ApiService.java    From WanAndroid with MIT License 4 votes vote down vote up
@POST("article/query/{pageNum}/json")
@FormUrlEncoded
Observable<ArticleDataRes> getSearchResult(@Path("pageNum") int pageNum, @Field("k") String keywords);
 
Example #11
Source File: ApiService.java    From WanAndroid with MIT License 4 votes vote down vote up
@POST("lg/uncollect/{articleId}/json")
@FormUrlEncoded
Observable<ArticleDataRes> cancelCollectedArticle(@Path("articleId") int articleId,@Field("originId")int originId);
 
Example #12
Source File: ApiService.java    From WanAndroid with MIT License 4 votes vote down vote up
@POST("lg/collect/{articleId}/json")
Observable<ArticleDataRes> collectWanAndroidArticle(@Path("articleId") int articleId);
 
Example #13
Source File: IHttpPostApi.java    From a with GNU General Public License v3.0 4 votes vote down vote up
@FormUrlEncoded
@POST
Observable<Response<String>> postMap(@Url String url,
                                     @FieldMap(encoded = true) Map<String, String> fieldMap,
                                     @HeaderMap Map<String, String> headers);
 
Example #14
Source File: IHttpPostApi.java    From a with GNU General Public License v3.0 4 votes vote down vote up
@POST
Observable<Response<String>> postJson(@Url String url,
                                      @Body RequestBody body,
                                      @HeaderMap Map<String, String> headers);
 
Example #15
Source File: SearchApis.java    From Yuan-WanAndroid with Apache License 2.0 4 votes vote down vote up
/**
 * 搜索
 * http://www.wanandroid.com/article/query/0/json
 */
@POST("article/query/{pageNum}/json")
@FormUrlEncoded
Observable<BaseResponse<Articles>> getSearchArticles(@Field("k") String key,//关键字
                                                    @Path("pageNum") int pageNum//页数
);
 
Example #16
Source File: WebsocketAuthAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/bullet-private")
Call<KucoinResponse<WebsocketTokenResponse>> getPrivateToken();
 
Example #17
Source File: WithdrawalAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/withdrawals")
Call<KucoinResponse<WithdrawApplyResponse>> applyWithdraw(@Body WithdrawApplyRequest request);
 
Example #18
Source File: AccountAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/accounts")
Call<KucoinResponse<Map<String, String>>> addAccount(@Body AccountCreateRequest request);
 
Example #19
Source File: AccountAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/accounts/inner-transfer")
Call<KucoinResponse<Map<String, String>>> applyTransfer(
        @Body AccountTransferRequest request);
 
Example #20
Source File: AccountAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/accounts/sub-transfer")
Call<KucoinResponse<Map<String, String>>> transferBetweenSubAndMaster(@Body SubMasterTransferRequest request);
 
Example #21
Source File: WebsocketPublicAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/bullet-public")
Call<KucoinResponse<WebsocketTokenResponse>> getPublicToken();
 
Example #22
Source File: DepositAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/deposit-addresses")
Call<KucoinResponse<DepositAddressResponse>> createDepositAddress(@Body DepositAddressCreateRequest request);
 
Example #23
Source File: OrderAPIRetrofit.java    From kucoin-java-sdk with MIT License 4 votes vote down vote up
@POST("api/v1/orders")
Call<KucoinResponse<OrderCreateResponse>> createOrder(@Body OrderCreateApiRequest opsRequest);
 
Example #24
Source File: SignApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("api/provisional-accounts/create")
Observable<SignResponse> pixivSign(@Header("Authorization") String token,
                                   @Field("user_name") String userName,
                                   @Field("ref") String ref);
 
Example #25
Source File: SignApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("/api/account/edit")
Observable<AccountEditResponse> changePixivID(@Header("Authorization") String token,
                                                      @Field("new_user_account") String new_user_account,
                                                      @Field("current_password") String current_password);
 
Example #26
Source File: SignApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("/api/account/edit")
Observable<AccountEditResponse> changeEmailAndPixivID(@Header("Authorization") String token,
                                            @Field("new_mail_address") String new_mail_address,
                                            @Field("new_user_account") String new_user_account,
                                            @Field("current_password") String current_password);
 
Example #27
Source File: IqdbApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@Multipart
@POST("/")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #28
Source File: SauceNaoApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@Multipart
@POST("/search.php")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #29
Source File: AppApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/user/follow/add")
Observable<NullResponse> postFollow(@Header("Authorization") String token,
                                    @Field("user_id") int user_id,
                                    @Field("restrict") String followType);
 
Example #30
Source File: AppApi.java    From Pixiv-Shaft with MIT License 4 votes vote down vote up
@FormUrlEncoded
@POST("v1/user/follow/delete")
Observable<NullResponse> postUnFollow(@Header("Authorization") String token,
                                      @Field("user_id") int user_id);