retrofit.http.POST类的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(6.6k)|赞(0)|评价(0)|浏览(180)

本文整理了Java中retrofit.http.POST类的一些代码示例,展示了POST类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。POST类的具体详情如下:
包路径:retrofit.http.POST
类名称:POST

POST介绍

暂无

代码示例

代码示例来源:origin: naman14/Timber

@POST(BASE)
@FormUrlEncoded
void getScrobbleInfo(@Field("api_sig") String apisig, @Field("format") String format, @FieldMap Map<String, String> fields, Callback<ScrobbleInfo> callback);

代码示例来源:origin: naman14/Timber

@POST(BASE)
@FormUrlEncoded
void getUserLoginInfo(@Field("method") String method, @Field("format") String format, @Field("api_key") String apikey, @Field("api_sig") String apisig, @Field("username") String username, @Field("password") String password, Callback<UserLoginInfo> callback);

代码示例来源:origin: spinnaker/kayenta

@POST("/judge")
 CanaryJudgeResult judge(@Body RemoteJudgeRequest body);
}

代码示例来源:origin: yigit/dev-summit-architecture-demo

@POST("new_post.json")
  Call<NewPostResponse> sendPost(@Query("text") String text, @Query("client_id") String clientId,
      // ultra secure API sending user id :p
      @Query("user_id") long userId);
}

代码示例来源:origin: spinnaker/kayenta

@POST("/{ownerApp}/{configType}/{configName}")
 Response post(@Path("ownerApp") String ownerApp,
        @Path("configType") String configType,
        @Path("configName") String configName,
        @Body RequestBody config);
}

代码示例来源:origin: spinnaker/kayenta

/**
  * Executes a signal flow program.
  *
  * @param accessToken     The SignalFx API Access token associated with the organization that you are querying.
  * @param startEpochMilli (Optional) start timestamp in milliseconds since epoch
  * @param endEpochMilli   (Optional) stop timestamp in milliseconds since epoch
  * @param resolution      (Optional) the minimum desired data resolution, in milliseconds
  * @param maxDelay        (Optional) desired maximum data delay, in milliseconds between 0 (for automatic maximum delay) and 900000
  * @param immediate       (Optional) whether to adjust the stop timestamp so that the computation doesn't wait for future data to be available
  * @param program         The signal flow program to execute
  * @return The list of channel messages from the signal flow output
  */
 @POST("/v2/signalflow/execute")
 SignalFlowExecutionResult executeSignalFlowProgram(@Header("X-SF-TOKEN") String accessToken,
                           @Query("start") long startEpochMilli,
                           @Query("stop") long endEpochMilli,
                           @Query("resolution") long resolution,
                           @Query("maxDelay") long maxDelay,
                           @Query("immediate") boolean immediate,
                           @Body String program);
}

代码示例来源:origin: com.netflix.spinnaker.fiat/fiat-api

/**
 * Use to update all users.
 * @return The number of non-anonymous users synced.
 */
@POST("/roles/sync")
long sync();

代码示例来源:origin: org.kurento/kurento-repository-client

/**
 * Creates a new repository item with the provided metadata, ready for media recording.
 *
 * @param metadata
 *          a map of values. Can be empty but <strong>not null</strong>.
 * @return a {@link RepositoryItemRecorder} containing the item's id and an URL through which
 *         Kurento Media Server can record media sent by the client
 */
@POST("/repo/item")
RepositoryItemRecorder createRepositoryItem(@Body Map<String, String> metadata);

代码示例来源:origin: org.kurento/kurento-repository-client

/**
 * Searches for repository items by each pair of attributes and their expected values.
 *
 * @param searchValues
 *          pairs of attributes and their values
 * @return a {@link Set}&lt;{@link String}&gt; with identifiers of the repository items that were
 *         found
 */
@POST("/repo/item/find")
Set<String> simpleFindItems(@Body Map<String, String> searchValues);

代码示例来源:origin: com.netflix.spinnaker.fiat/fiat-api

/**
 * Use to update a subset of users. An empty list will update the anonymous/unrestricted user.
 *
 * @param roles Users with any role listed should be updated.
 * @return The number of non-anonymous users synced.
 */
@POST("/roles/sync")
long sync(@Body List<String> roles);

代码示例来源:origin: tomahawk-player/tomahawk-android

@POST("/relationships")
HatchetPlaylistEntries postRelationship(
    @Header("Authorization") String accesstoken,
    @Body TypedInput rawBody
);

代码示例来源:origin: tomahawk-player/tomahawk-android

@POST("/playbacklogEntries")
Response postPlaybackLogEntries(
    @Header("Authorization") String accesstoken,
    @Body TypedInput rawBody
);

代码示例来源:origin: tomahawk-player/tomahawk-android

@POST("/playlistEntries")
HatchetPlaylistEntries postPlaylistsPlaylistEntries(
    @Header("Authorization") String accesstoken,
    @Body TypedInput rawBody
);

代码示例来源:origin: com.netflix.spinnaker.fiat/fiat-api

/**
 * @param userId The user being logged in
 * @param ignored ignored.
 * @return ignored.
 */
@POST("/roles/{userId}")
Response loginUser(@Path("userId") String userId, @Body String ignored /* retrofit requires this */);

代码示例来源:origin: tomahawk-player/tomahawk-android

@FormUrlEncoded
@POST("/tokens/refresh/bearer")
HatchetAuthResponse getBearerAccessToken(
    @Field("refresh_token") String refresh_token,
    @Field("grant_type") String grant_type
);

代码示例来源:origin: NightscoutFoundation/xDrip

@POST("General/AuthenticatePublisherAccount")
Call<String> authenticatePublisherAccount(@Query("sessionId") String sessionId,
                        @Query("serialNumber") String serialNumber,
                        @Body Map<String, String> body);
// maybe needs ?sessionId={YourSessionId}&serialNumber={YourdexcomSerialNumber}

代码示例来源:origin: NightscoutFoundation/xDrip

@POST("Publisher/DeleteContact")
@Headers({"Content-Length: 0"})
Call<ResponseBody> deleteContact(@Query("sessionId") String sessionId,
                 @Query("contactId") String contactId);
// needs ?sessionId={YourSessionId}&contactId={foll`owersContactId}

代码示例来源:origin: com.netflix.spinnaker.halyard/halyard-cli

@POST("/v1/config/deployments/{deploymentName}/generate/")
DaemonTask<Halconfig, String> generateDeployment(
  @Path("deploymentName") String deploymentName,
  @Query("validate") boolean validate,
  @Body String _ignore);

代码示例来源:origin: com.hp.autonomy.hod/java-hod-client

/**
 * Extract content from a CSV file into a JSON format using HP Haven on Demand using a token proxy
 * @param token The authentication token
 * @param file The bytes of a file containing the data to be extracted.
 * @return {@link List} of JSON objects stored as a {@link LinkedHashMap} with column names as keys and cell values as values.
 */
@POST(URL)
@Multipart
Response extractFromFile(@Header("token") AuthenticationToken<?, ?> token, @Part("file") TypedOutput file) throws HodErrorException;

代码示例来源:origin: com.netflix.spinnaker.halyard/halyard-cli

@POST("/v1/config/deployments/{deploymentName}/clean/")
DaemonTask<Halconfig, Object> cleanDeployment(
  @Path("deploymentName") String deploymentName,
  @Query("validate") boolean validate,
  @Body String _ignore);

相关文章