org.keycloak.admin.client

## Class CreatedResponseUtil

- java.lang.Object
- - org.keycloak.admin.client.CreatedResponseUtil

-     public class CreatedResponseUtil
      extends Object

  A Utility class that parses the Response object into the underlying ID attribute
  Author:
    John D. Ament, Stan Silvert ssilvert@redhat.com (C) 2016 Red Hat Inc.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CreatedResponseUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `getCreatedId(javax.ws.rs.core.Response response)` Reads the Response object, confirms that it returns a 201 created and parses the ID from the location It always assumes the ID is the last segment of the URI

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CreatedResponseUtil

          public CreatedResponseUtil()

  - ### Method Detail

    - #### getCreatedId

          public static String getCreatedId(javax.ws.rs.core.Response response)
                                     throws javax.ws.rs.WebApplicationException

      Reads the Response object, confirms that it returns a 201 created and parses the ID from the location It always assumes the ID is the last segment of the URI
      Parameters:
        `response` - The JAX-RS Response received
      Returns:
        The String ID portion of the URI
      Throws:
        `javax.ws.rs.WebApplicationException` - if the response is not a 201 Created

Copyright © 2021 JBoss by Red Hat. All rights reserved.