public class Requests extends Object
Constructor and Description |
---|
Requests() |
Modifier and Type | Method and Description |
---|---|
static long |
downloadFile(@NotNull RequestMethod method,
@NotNull String url,
@NotNull Path path)
URLを使用してファイルをダウンロードします。
|
static long |
downloadFile(@NotNull RequestMethod method,
@NotNull String url,
@NotNull Path path,
@Nullable Consumer<DownloadProgress> onProgress)
URLを使用してファイルをダウンロードします。
|
static @NotNull HTTPResponse |
request(@NotNull RequestContext context)
リクエストを送信し、レスポンスを受け取ります。
|
@NotNull public static @NotNull HTTPResponse request(@NotNull @NotNull RequestContext context)
context
- リクエストのコンテキストpublic static long downloadFile(@NotNull @NotNull RequestMethod method, @NotNull @NotNull String url, @NotNull @NotNull Path path, @Nullable @Nullable Consumer<DownloadProgress> onProgress) throws IOException
method
- リクエストメソッドurl
- URLpath
- ダウンロード先のパスonProgress
- ダウンロードの進捗を通知するコールバックIOException
- ダウンロードに失敗した場合public static long downloadFile(@NotNull @NotNull RequestMethod method, @NotNull @NotNull String url, @NotNull @NotNull Path path) throws IOException
method
- リクエストメソッドurl
- URLpath
- ダウンロード先のパスIOException
- ダウンロードに失敗した場合Copyright © 2023. All rights reserved.