io.vertx.rxjava.ext.auth.oauth2

## Class OAuth2Response

- java.lang.Object
- - io.vertx.rxjava.ext.auth.oauth2.OAuth2Response

-     public class OAuth2Response
      extends Object

  A response from a fetch request. This class represents a secure response from a Oauth2 fetch call. A fetch is a simplified HTTP response from a protected resource.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<OAuth2Response>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuth2Response(OAuth2Response delegate)`
    `OAuth2Response(Object delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Buffer` | `body()` The HTTP response body as a buffer
    `boolean` | `equals(Object o)`
    `OAuth2Response` | `getDelegate()`
    `String` | `getHeader(String name)` Looks up a HTTP response header by name, in case where the response is a list of headers, the first one is returned.
    `int` | `hashCode()`
    `MultiMap` | `headers()` The HTTP response headers from the HTTP layer.
    `boolean` | `is(String contentType)` Helper to analize the response body.
    `JsonArray` | `jsonArray()` The HTTP response body as a JsonArray
    `JsonObject` | `jsonObject()` The HTTP response body as a JsonObject
    `static OAuth2Response` | `newInstance(OAuth2Response arg)`
    `int` | `statusCode()` the returned status code from the HTTP layer.
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<OAuth2Response> __TYPE_ARG

  - ### Constructor Detail

    - #### OAuth2Response

          public OAuth2Response(OAuth2Response delegate)

    - #### OAuth2Response

          public OAuth2Response(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public OAuth2Response getDelegate()

    - #### statusCode

          public int statusCode()

      the returned status code from the HTTP layer.
      Returns:
        HTTP status code

    - #### headers

          public MultiMap headers()

      The HTTP response headers from the HTTP layer.
      Returns:
        the HTTP headers

    - #### getHeader

          public String getHeader(String name)

      Looks up a HTTP response header by name, in case where the response is a list of headers, the first one is returned.
      Parameters:
        `name` - of the header to look up
      Returns:
        the single value for the header.

    - #### body

          public Buffer body()

      The HTTP response body as a buffer
      Returns:
        a buffer with the HTTP response body

    - #### jsonObject

          public JsonObject jsonObject()

      The HTTP response body as a JsonObject
      Returns:
        a JsonObject from the HTTP response body

    - #### jsonArray

          public JsonArray jsonArray()

      The HTTP response body as a JsonArray
      Returns:
        a JsonArray from the HTTP response body

    - #### is

          public boolean is(String contentType)

      Helper to analize the response body. The test is performed against the header Content-Type, the content of the body is not analyzed.
      Parameters:
        `contentType` - a content type to test, e.g.: application/json
      Returns:
        true if the header matches

    - #### newInstance

          public static OAuth2Response newInstance(OAuth2Response arg)

Copyright © 2022 Eclipse. All rights reserved.