toHeaderEnum method

HeaderEnum toHeaderEnum()

Implementation

HeaderEnum toHeaderEnum() {
  switch (this) {
    case 'Accept':
      return HeaderEnum.accept;
    case 'Accept-Charset':
      return HeaderEnum.acceptCharset;
    case 'Accept-Datetime':
      return HeaderEnum.acceptDatetime;
    case 'Accept-Encoding':
      return HeaderEnum.acceptEncoding;
    case 'Accept-Language':
      return HeaderEnum.acceptLanguage;
    case 'Authorization':
      return HeaderEnum.authorization;
    case 'CloudFront-Forwarded-Proto':
      return HeaderEnum.cloudFrontForwardedProto;
    case 'CloudFront-Is-Desktop-Viewer':
      return HeaderEnum.cloudFrontIsDesktopViewer;
    case 'CloudFront-Is-Mobile-Viewer':
      return HeaderEnum.cloudFrontIsMobileViewer;
    case 'CloudFront-Is-SmartTV-Viewer':
      return HeaderEnum.cloudFrontIsSmartTVViewer;
    case 'CloudFront-Is-Tablet-Viewer':
      return HeaderEnum.cloudFrontIsTabletViewer;
    case 'CloudFront-Viewer-Country':
      return HeaderEnum.cloudFrontViewerCountry;
    case 'Host':
      return HeaderEnum.host;
    case 'Origin':
      return HeaderEnum.origin;
    case 'Referer':
      return HeaderEnum.referer;
  }
  throw Exception('$this is not known in enum HeaderEnum');
}