インターフェース ServerResponse

すべての既知のサブインターフェース:
EntityResponse<T>RenderingResponse

public interface ServerResponse
ハンドラー関数またはフィルター関数によって返される、型指定されたサーバー側の HTTP レスポンスを表します。
導入:
5.0
作成者:
Arjen Poutsma, Juergen Hoeller, Sebastien Deleuze
  • メソッドの詳細

    • statusCode

      HttpStatusCode statusCode()
      このレスポンスのステータスコードを返します。
      戻り値:
      HttpStatusCode 値としてのステータス
    • rawStatusCode

      @DeprecatedSE(since="6.0") int rawStatusCode()
      使用すべきではありません。
      6.0 現在、statusCode() を推奨
      このレスポンスのステータスコードを整数で返します。
      戻り値:
      整数としてのステータス
      導入:
      5.2
    • headers

      HttpHeaders headers()
      このレスポンスのヘッダーを返します。
    • cookies

      このレスポンスの Cookie を返します。
    • writeTo

      reactor.core.publisher.Mono<VoidSE> writeTo(ServerWebExchange exchange, ServerResponse.Context context)
      このレスポンスを指定された Web 交換に書き込みます。
      パラメーター:
      exchange - 書き込み先の Web 交換
      context - 書くときに使用するコンテキスト
      戻り値:
      書き込みが完了したことを示す Mono<Void> 
    • from

      指定されたレスポンスのステータスコードとヘッダーを使用してビルダーを作成します。
      パラメーター:
      other - ステータスとヘッダーをコピーするレスポンス
      戻り値:
      作成されたビルダー
    • from

      static reactor.core.publisher.Mono<ServerResponse> from(ErrorResponse response)
      指定された ErrorResponse から ServerResponse を作成します。
      パラメーター:
      response - 初期化する ErrorResponse
      戻り値:
      レスポンスを内蔵した Mono 
      導入:
      6.0
    • status

      指定された HTTP ステータスでビルダーを作成します。
      パラメーター:
      status - レスポンスステータス
      戻り値:
      作成されたビルダー
    • status

      static ServerResponse.BodyBuilder status(int status)
      指定された HTTP ステータスでビルダーを作成します。
      パラメーター:
      status - レスポンスステータス
      戻り値:
      作成されたビルダー
      導入:
      5.0.3
    • ok

      ステータスを 200 OK に設定してビルダーを作成します。
      戻り値:
      作成されたビルダー
    • created

      static ServerResponse.BodyBuilder created(URISE location)
      201 Created ステータスと指定された URI に設定されたロケーションヘッダーで新しいビルダーを作成します。
      パラメーター:
      location - ロケーション URI
      戻り値:
      作成されたビルダー
    • accepted

      static ServerResponse.BodyBuilder accepted()
      202 承認済みステータスのビルダーを作成します。
      戻り値:
      作成されたビルダー
    • noContent

      static ServerResponse.HeadersBuilder<?> noContent()
      204 コンテンツなしステータスのビルダーを作成します。
      戻り値:
      作成されたビルダー
    • seeOther

      static ServerResponse.BodyBuilder seeOther(URISE location)
      303 他を見るステータスと指定された URI に設定されたロケーションヘッダーを使用してビルダーを作成します。
      パラメーター:
      location - ロケーション URI
      戻り値:
      作成されたビルダー
    • temporaryRedirect

      static ServerResponse.BodyBuilder temporaryRedirect(URISE location)
      307 一時的なリダイレクトステータスと指定された URI に設定されたロケーションヘッダーを使用してビルダーを作成します。
      パラメーター:
      location - ロケーション URI
      戻り値:
      作成されたビルダー
    • permanentRedirect

      static ServerResponse.BodyBuilder permanentRedirect(URISE location)
      308 永久リダイレクトステータスと指定された URI に設定されたロケーションヘッダーを使用してビルダーを作成します。
      パラメーター:
      location - ロケーション URI
      戻り値:
      作成されたビルダー
    • badRequest

      static ServerResponse.BodyBuilder badRequest()
      400 不正なリクエストステータスのビルダーを作成します。
      戻り値:
      作成されたビルダー
    • notFound

      static ServerResponse.HeadersBuilder<?> notFound()
      404 お探しのページが見つかりませんでしたステータスのビルダーを作成します。
      戻り値:
      作成されたビルダー
    • unprocessableEntity

      static ServerResponse.BodyBuilder unprocessableEntity()
      422 処理できないエンティティステータスのビルダーを作成します。
      戻り値:
      作成されたビルダー