export library

Classes

AccumulatorSink<T>
A sink that provides access to all the events that have been passed to it.
AsciiCodec
An AsciiCodec allows encoding strings as ASCII bytes and decoding ASCII bytes to strings.
AsciiDecoder
Converts ASCII bytes to string.
AsciiEncoder
Converts strings of only ASCII characters to bytes.
Base64Codec
A base64 encoder and decoder.
Base64Decoder
Decoder for base64 encoded data.
Base64Encoder
Base64 and base64url encoding converter.
BaseClient
The abstract base class for an HTTP client.
BaseRequest
The base class for HTTP requests.
BaseResponse
The base class for HTTP responses.
BaseResponseWithUrl
A BaseResponse with a url field.
ByteAccumulatorSink
A sink that provides access to the concatenated bytes passed to it.
ByteConversionSink
The ByteConversionSink provides an interface for converters to efficiently transmit byte data.
ByteStream
A stream of chunks of bytes representing a single piece of data.
ChunkedConversionSink<T>
A ChunkedConversionSink is used to transmit data more efficiently between two converters during chunked conversions.
Client
The interface for HTTP clients that take care of maintaining persistent connections across multiple requests to the same server.
ClosableStringSink
A ClosableStringSink extends the StringSink interface by adding a close method.
Codec<S, T>
A Codec encodes and (if supported) decodes data.
CodePage
A mapping between bytes and characters.
CodePageDecoder
A code page decoder, converts from bytes to characters.
CodePageEncoder
Encoder for a code page.
Converter<S, T>
A Converter converts data from one representation into another.
Digest
A message digest as computed by a Hash or HMAC function.
Encoding
Open-ended set of encodings.
FixedDateTimeFormatter
A formatter and parser for DateTime in a fixed format String pattern.
Hash
An interface for cryptographic hash functions.
HexCodec
A codec that converts byte arrays to and from hexadecimal strings, following the Base16 spec.
HexDecoder
A converter that decodes hexadecimal strings into byte arrays.
HexEncoder
A converter that encodes byte arrays into hexadecimal strings.
Hmac
An implementation of keyed-hash method authentication codes.
HtmlEscape
Converter which escapes characters with special meaning in HTML.
HtmlEscapeMode
HTML escape modes.
IdentityCodec<T>
A Codec that performs the identity conversion (changing nothing) in both directions.
JsonCodec
A JsonCodec encodes JSON objects to strings and decodes strings to JSON objects.
JsonDecoder
This class parses JSON strings and builds the corresponding objects.
JsonEncoder
This class converts JSON objects to strings.
JsonUtf8Encoder
Encoder that encodes a single object as a UTF-8 encoded JSON string.
Latin1Codec
A Latin1Codec encodes strings to ISO Latin-1 (aka ISO-8859-1) bytes and decodes Latin-1 bytes to strings.
Latin1Decoder
This class converts Latin-1 bytes (lists of unsigned 8-bit integers) to a string.
Latin1Encoder
This class converts strings of only ISO Latin-1 characters to bytes.
LineSplitter
A StreamTransformer that splits a String into individual lines.
MultipartFile
A file to be uploaded as part of a MultipartRequest.
MultipartRequest
A multipart/form-data request.
PercentCodec
A codec that converts byte arrays to and from percent-encoded (also known as URL-encoded) strings according to RFC 3986.
PercentDecoder
A converter that decodes percent-encoded strings into byte arrays.
PercentEncoder
A converter that encodes byte arrays into percent-encoded strings.
Request
An HTTP request where the entire request body is known in advance.
Response
An HTTP response where the entire response body is known in advance.
StreamedRequest
An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent.
StreamedResponse
An HTTP response where the response body is received asynchronously after the headers have been received.
StringAccumulatorSink
A sink that provides access to the concatenated strings passed to it.
StringConversionSink
A sink for converters to efficiently transmit String data.
Utf8Codec
A Utf8Codec encodes strings to utf-8 code units (bytes) and decodes UTF-8 code units to strings.
Utf8Decoder
This class converts UTF-8 code units (lists of unsigned 8-bit integers) to a string.
Utf8Encoder
This class converts strings to their UTF-8 code units (a list of unsigned 8-bit integers).

Constants

ascii → const AsciiCodec
An instance of the default implementation of the AsciiCodec.
base64 → const Base64Codec
A base64 encoder and decoder.
base64Url → const Base64Codec
A base64url encoder and decoder.
hex → const HexCodec
The canonical instance of HexCodec.
htmlEscape → const HtmlEscape
A String converter that converts characters to HTML entities.
json → const JsonCodec
An instance of the default implementation of the JsonCodec.
latin1 → const Latin1Codec
An instance of the default implementation of the Latin1Codec.
md5 → const Hash
An implementation of the MD5 hash function.
percent → const PercentCodec
The canonical instance of PercentCodec.
sha1 → const Hash
An implementation of the SHA-1 hash function.
sha224 → const Hash
An implementation of the SHA-224 hash function.
sha256 → const Hash
An implementation of the SHA-256 hash function.
sha384 → const Hash
An implementation of the SHA-384 hash function.
sha512 → const Hash
An implementation of the SHA-512 hash function.
sha512224 → const Hash
An implementation of the SHA-512/224 hash function.
sha512256 → const Hash
An implementation of the SHA-512/256 hash function.
unicodeBomCharacterRune → const int
The Unicode Byte Order Marker (BOM) character U+FEFF.
unicodeReplacementCharacterRune → const int
The Unicode Replacement character U+FFFD (�).
utf8 → const Utf8Codec
An instance of the default implementation of the Utf8Codec.

Properties

latin10 CodePage
The ISO-8859-16/Latin-10 (South Eastern European) code page.
final
latin2 CodePage
The ISO-8859-2/Latin-2 (Eastern European) code page.
final
latin3 CodePage
The ISO-8859-3/Latin-3 (South European) code page.
final
latin4 CodePage
The ISO-8859-4/Latin-4 (North European) code page.
final
latin5 CodePage
The ISO-8859-9/Latin-5 (Turkish) code page.
final
latin6 CodePage
The ISO-8859-10/Latin-6 (Nordic) code page.
final
latin7 CodePage
The ISO-8859-13/Latin-6 (Baltic Rim) code page.
final
latin8 CodePage
The ISO-8859-14/Latin-8 (Celtic) code page.
final
latin9 CodePage
The ISO-8859-15/Latin-9 (Western European revised) code page.
final
latinArabic CodePage
The ISO-8859-6/Latin-Arabic code page.
final
latinCyrillic CodePage
The ISO-8859-5/Latin-Cyrillic code page.
final
latinGreek CodePage
The ISO-8859-7/Latin-Greek code page.
final
latinHebrew CodePage
The ISO-8859-7/Latin-Hebrew code page.
final
latinThai CodePage
The ISO-8859-11/Latin-Thai code page.
final

Functions

base64Decode(String source) Uint8List
Decodes base64 or base64url encoded bytes.
base64Encode(List<int> bytes) String
Encodes bytes using base64 encoding.
base64UrlEncode(List<int> bytes) String
Encodes bytes using base64url encoding.
delete(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP DELETE request with the given headers to the given URL.
get(Uri url, {Map<String, String>? headers}) Future<Response>
Sends an HTTP GET request with the given headers to the given URL.
Sends an HTTP HEAD request with the given headers to the given URL.
jsonDecode(String source, {Object? reviver(Object? key, Object? value)?}) → dynamic
Parses the string and returns the resulting Json object.
jsonEncode(Object? object, {Object? toEncodable(Object? nonEncodable)?}) String
Converts object to a JSON string.
patch(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PATCH request with the given headers and body to the given URL.
post(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP POST request with the given headers and body to the given URL.
put(Uri url, {Map<String, String>? headers, Object? body, Encoding? encoding}) Future<Response>
Sends an HTTP PUT request with the given headers and body to the given URL.
read(Uri url, {Map<String, String>? headers}) Future<String>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a String.
readBytes(Uri url, {Map<String, String>? headers}) Future<Uint8List>
Sends an HTTP GET request with the given headers to the given URL and returns a Future that completes to the body of the response as a list of bytes.
runWithClient<R>(R body(), Client clientFactory(), {ZoneSpecification? zoneSpecification}) → R
Runs body in its own Zone with the Client returned by clientFactory set as the default Client.

Typedefs

ByteConversionSinkBase = ByteConversionSink
This class provides a base-class for converters that need to accept byte inputs.
StringConversionSinkBase = StringConversionSink
This class provides a base-class for converters that need to accept String inputs.
StringConversionSinkMixin = StringConversionSink
This class provides a mixin for converters that need to accept String inputs.

Exceptions / Errors

ClientException
An exception caused by an error in a pkg/http client.
JsonCyclicError
Reports that an object could not be stringified due to cyclic references.
JsonUnsupportedObjectError
Error thrown by JSON serialization if an object cannot be serialized.