• Object Storage Service

obs
  1. Help Center
  2. Object Storage Service
  3. Developer Guide (Java SDK)
  4. Troubleshooting
  5. SDK Common Response Headers

SDK Common Response Headers

After you call an API in an instance of ObsClient, an instance of the HeaderResponse class (or its sub-class) will be returned. It contains information about HTTP/HTTPS response headers.

Sample code for processing public response headers:

String endPoint = "yourdomainname";
String ak = "*** Provide your Access Key ***";
String sk = "*** Provide your Secret Key ***";
// Create an instance of ObsClient.
ObsClient obsClient = new ObsClient(ak, sk, endPoint);
HeaderResponse response = obsClient.createBucket("bucketname");

// Obtain the UUID from the public response headers.
System.out.println("\t" + response.getResponseHeaders().get("request-id"));

obsClient.close();