value property

String get value

Returns the string representation of the HTTP method

Example:

HttpMethod.GET.value // returns "GET"
HttpMethod.POST.value // returns "POST"

Implementation

String get value {
  switch (this) {
    case HttpMethod.GET:
      return 'GET';
    case HttpMethod.POST:
      return 'POST';
    case HttpMethod.PUT:
      return 'PUT';
    case HttpMethod.DELETE:
      return 'DELETE';
    case HttpMethod.PATCH:
      return 'PATCH';
    case HttpMethod.HEAD:
      return 'HEAD';
    case HttpMethod.OPTIONS:
      return 'OPTIONS';
  }
}