Package 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 Description CreatedResponseUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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
-
-
-
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
-
-