http_methods 1.1.1 copy "http_methods: ^1.1.1" to clipboard
http_methods: ^1.1.1 copied to clipboard

List of all HTTP methods registered with IANA as list of strings, and metadata such as whether a method idempotent.

List of Registered HTTP Methods #

This package provides a list of all registered HTTP methods, as well as whether a method is considers safe, that is, specified in HTTP 1.1.

Disclaimer: This is not an officially supported Google product.

Example #

import 'package:http_methods/http_methods.dart';

void main() {
  assert(isHttpMethod('get'));
  assert(isHttpMethod('GET'));
  assert(isHttpMethod('PUT'));
  assert(!isHttpMethod('not-a-method'));

  print('all http methods:');
  for (String method in httpMethods) {
    print(method);
  }
}

See Also #

10
likes
160
pub points
74%
popularity

Publisher

verified publishergoogle.dev

List of all HTTP methods registered with IANA as list of strings, and metadata such as whether a method idempotent.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#http

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on http_methods