createHeader static method

Map<String, String> createHeader(
  1. int throughput
)

Implementation

static Map<String, String> createHeader(int throughput) {
  if (throughput < _min) {
    throw ApplicationException(
        'Invalid throughput: minimum value is $_min RUs.');
  }
  if (throughput % 100 != 0) {
    throw ApplicationException(
        'Invalid throughput: value must be a multiple of 100 RUs.');
  }
  return {
    HttpHeader.msOfferThroughput: throughput.toString(),
  };
}