Skip to content
pubscout

http_methods

1.1.1, released 4 years ago by google.dev

Provides a list of IANA‑registered HTTP methods and helper functions to check them.

WASM-readyQuiet but busy
$ flutter pub add http_methods
Source repository

What it does

Exports constants with all registered HTTP method names and metadata such as safety and idempotence. Includes utility functions like isHttpMethod to validate a method string.

AI-written summary of version 1.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a reliable source of all standard HTTP methods
  • You want to validate or normalize method strings without pulling in a full HTTP client

Skip it when

  • You already have an HTTP client that supplies its own method list
  • You need advanced networking features beyond method validation

Strengths

  • Zero dependencies
  • Small footprint
  • Accurate, up‑to‑date IANA data

Weaknesses

  • Only provides method data, no networking capabilities
  • No runtime updates if IANA adds new methods

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0
import 'package:http_methods/http_methods.dart';

void main() {
  assert(isHttpMethod('GET'));
  print(httpMethods);
}

Alternatives

Packages that do the same job and could replace http_methods.

  • http

    Provides a full HTTP client and already includes common method constants

Works with

Packages commonly used together with http_methods: ones it builds on, ones built on it, and its own family.