Updated mock_request

This commit is contained in:
thomashii 2021-06-24 19:59:11 +08:00
parent 32db2c2b46
commit 0a456954b4
3 changed files with 33 additions and 17 deletions

View file

@ -1,22 +1,37 @@
# 2.0.1
# Change Log
## 2.0.2
* Updated README
* Updated test cases
## 2.0.1
* Updated README
# 2.0.0
## 2.0.0
* Migrated to work with Dart SDK 2.12.x NNBD
# 1.0.7
## 1.0.7
* Prepare for upcoming Dart SDK change where `HttpHeaders` methods
`add` and `set` take an additional optional parameter `preserveHeaderCase` (thanks @domesticmouse!).
# 1.0.6
## 1.0.6
* Prepare for upcoming Dart SDK change whereby `HttpRequest` implements
`Stream<Uint8List>` rather than `Stream<List<int>>`.
# 1.0.5
## 1.0.5
* Add `toString` to `MockHttpHeaders`.
# 1.0.4
## 1.0.4
* Fix for `ifModifiedSince`
# 1.0.3
## 1.0.3
* Dart2 fixes
* Apparently fix hangs that break Angel tests

View file

@ -1,19 +1,20 @@
# angel3_mock_request
[![version](https://img.shields.io/badge/pub-v2.0.1-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
# Mock HTTP Request
[![version](https://img.shields.io/badge/pub-v2.0.2-brightgreen)](https://pub.dartlang.org/packages/angel3_mock_request)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request/LICENSE)
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
This makes it possible to test server-side Dart applications without
**Forked from `mock_request` to support NNBD**
Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc. This makes it possible to test server-side Dart applications without
having to ever bind to a port.
This package was originally designed to testing
[Angel](https://github.com/dukefirehawk/angel/tree/angel3)
applications smoother, but works with any Dart-based server. :)
This package was originally designed to make testing [Angel3](https://github.com/dukefirehawk/angel/tree/angel3) applications smoother, but works with any Dart-based server.
## Usage
# Usage
```dart
var rq = MockHttpRequest('GET', Uri.parse('/foo'));
await rq.close();
@ -24,4 +25,4 @@ expect(await rs.transform(UTF8.decoder).join(),
equals(JSON.encode('Hello, world!')));
```
More examples can be found in the included tests.
More examples can be found in the included test cases.

View file

@ -1,5 +1,5 @@
name: angel3_mock_request
version: 2.0.1
version: 2.0.2
description: Manufacture dart:io HttpRequests, HttpResponses, HttpHeaders, etc.
homepage: https://github.com/dukefirehawk/angel/tree/angel3/packages/mock_request
environment: