code: private MwsResponseHeaderMetadata getResponseHeaderMetadata(HttpResponse response) {
          Header requestIdHeader = response.getFirstHeader("x-mws-request-id");
          String requestId = requestIdHeader == null ? null : requestIdHeader.getValue();
  
          Header timestampHeader = response.getFirstHeader("x-mws-timestamp");
          String timestamp = timestampHeader == null ? null : timestampHeader.getValue();
  
          Header contextHeader = response.getFirstHeader("x-mws-response-context");
          String contextString = contextHeader==null ? "" : contextHeader.getValue();
          List<String> context = Collections.unmodifiableList(Arrays.asList(contextString.split(",")));
  
          Double quotaMax;
          try {
              Header quotaMaxHeader = response.getFirstHeader("x-mws-quota-max");
              quotaMax = quotaMaxHeader == null ? null : Double.valueOf(quotaMaxHeader.getValue());
          } catch (NumberFormatException ex) {
              quotaMax = null;
          }
  
          Double quotaRemaining;
          try {
              Header quotaRemainingHeader = response.getFirstHeader("x-mws-quota-remaining");
              quotaRemaining = quotaRemainingHeader == null ? null : Double.valueOf(quotaRemainingHeader.getValue());
          } catch (NumberFormatException ex) {
              quotaRemaining = null;
          }
  
          Date quotaResetDate;
          try {
              Header quotaResetHeader = response.getFirstHeader("x-mws-quota-resetsOn");
              quotaResetDate = quotaResetHeader == null ? null : MwsUtl.parseTimestamp(quotaResetHeader.getValue());
          } catch (java.text.ParseException ex) {
              quotaResetDate = null;
          }
  
          return new MwsResponseHeaderMetadata(requestId, context, timestamp, quotaMax, quotaRemaining, quotaResetDate);
      }
docs: Get the metadata from the response headers.
  
  @param response
  
  @return The metadata.