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 Project: Yuan-WanAndroid   Author: jsyjst   File: CollectApis.java    License: 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 Project: Yuan-WanAndroid   Author: jsyjst   File: PersonApis.java    License: 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 Project: Yuan-WanAndroid   Author: jsyjst   File: PersonApis.java    License: 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 Project: beihu-boot   Author: beihu-stack   File: TestHttpClient.java    License: Apache License 2.0 4 votes vote down vote up
@POST(value = "/app/statistics/buyQuantity")
Call<TestHttpRs> test(@Body TestHttpDto testHttpDto);
 
Example #5
Source Project: appcenter-plugin   Author: jenkinsci   File: UploadService.java    License: 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 Project: appcenter-plugin   Author: jenkinsci   File: AppCenterService.java    License: 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 Project: appcenter-plugin   Author: jenkinsci   File: AppCenterService.java    License: 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 Project: WanAndroid   Author: chejdj   File: ApiService.java    License: 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 Project: WanAndroid   Author: chejdj   File: ApiService.java    License: 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 Project: WanAndroid   Author: chejdj   File: ApiService.java    License: 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 Project: WanAndroid   Author: chejdj   File: ApiService.java    License: 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 Project: WanAndroid   Author: chejdj   File: ApiService.java    License: MIT License 4 votes vote down vote up
@POST("lg/collect/{articleId}/json")
Observable<ArticleDataRes> collectWanAndroidArticle(@Path("articleId") int articleId);
 
Example #13
Source Project: a   Author: 804463258   File: IHttpPostApi.java    License: 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 Project: a   Author: 804463258   File: IHttpPostApi.java    License: 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 Project: Yuan-WanAndroid   Author: jsyjst   File: SearchApis.java    License: 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 Project: kucoin-java-sdk   Author: Kucoin   File: WebsocketAuthAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/bullet-private")
Call<KucoinResponse<WebsocketTokenResponse>> getPrivateToken();
 
Example #17
Source Project: kucoin-java-sdk   Author: Kucoin   File: WithdrawalAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/withdrawals")
Call<KucoinResponse<WithdrawApplyResponse>> applyWithdraw(@Body WithdrawApplyRequest request);
 
Example #18
Source Project: kucoin-java-sdk   Author: Kucoin   File: AccountAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/accounts")
Call<KucoinResponse<Map<String, String>>> addAccount(@Body AccountCreateRequest request);
 
Example #19
Source Project: kucoin-java-sdk   Author: Kucoin   File: AccountAPIRetrofit.java    License: 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 Project: kucoin-java-sdk   Author: Kucoin   File: AccountAPIRetrofit.java    License: 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 Project: kucoin-java-sdk   Author: Kucoin   File: WebsocketPublicAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/bullet-public")
Call<KucoinResponse<WebsocketTokenResponse>> getPublicToken();
 
Example #22
Source Project: kucoin-java-sdk   Author: Kucoin   File: DepositAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/deposit-addresses")
Call<KucoinResponse<DepositAddressResponse>> createDepositAddress(@Body DepositAddressCreateRequest request);
 
Example #23
Source Project: kucoin-java-sdk   Author: Kucoin   File: OrderAPIRetrofit.java    License: MIT License 4 votes vote down vote up
@POST("api/v1/orders")
Call<KucoinResponse<OrderCreateResponse>> createOrder(@Body OrderCreateApiRequest opsRequest);
 
Example #24
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: SignApi.java    License: 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 Project: Pixiv-Shaft   Author: CeuiLiSA   File: SignApi.java    License: 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 Project: Pixiv-Shaft   Author: CeuiLiSA   File: SignApi.java    License: 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 Project: Pixiv-Shaft   Author: CeuiLiSA   File: IqdbApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #28
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: SauceNaoApi.java    License: MIT License 4 votes vote down vote up
@Multipart
@POST("/search.php")
Observable<Response<ResponseBody>> query(@Part MultipartBody.Part part);
 
Example #29
Source Project: Pixiv-Shaft   Author: CeuiLiSA   File: AppApi.java    License: 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 Project: Pixiv-Shaft   Author: CeuiLiSA   File: AppApi.java    License: 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);