std_uritemplate 2.0.1 copy "std_uritemplate: ^2.0.1" to clipboard
std_uritemplate: ^2.0.1 copied to clipboard

A Dart implementation of URI Templates defined in (RFC 6570).

example/main.dart

import 'package:std_uritemplate/std_uritemplate.dart';

void main() {
  final substitutes = <String, Object?>{
    'id': 'person',
    'fields': ['id', 'name', 'picture'],
    'long': 37.76,
    'lat': -122.427,
    'nullable': null,
  };

  // prints: /person
  print(StdUriTemplate.expand('{/id*}', substitutes));

  // prints: /person?fields=id,name,picture
  print(StdUriTemplate.expand('{/id*}{?fields,nullable}', substitutes));
}
3
likes
150
points
256
downloads

Publisher

verified publisherstduritemplate.proj.sbs

Weekly Downloads

A Dart implementation of URI Templates defined in (RFC 6570).

Homepage
Repository (GitHub)
View/report issues

Topics

#uri #template #rfc6570 #std-uritemplate

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on std_uritemplate