valueOf static method

HttpMethod valueOf(
  1. String value
)

Returns the http method associated with value.

Implementation

static HttpMethod valueOf(final String value) {
  for (final method in values) {
    if (method.value == value) {
      return method;
    }
  }

  throw UnsupportedError('Unsupported value [$value].');
}