Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Commit

Permalink
Apply correction on mock.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
platelk committed Oct 24, 2014
1 parent 9b418ee commit bfdbaf8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/mocks.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,13 @@ class MockRequest extends HttpRequestParser implements UnparsedRequest {

void parseBodyType() => parseHttpRequestBodyType(headers);

Future parseBody() => parseHttpRequestBody(shelfRequest.read());

Future parseBody() {
if (bodyHasBeenParsed() == false) {
return parseHttpRequestBody(_shelfRequest.read());
} else {
return parseHttpRequestBody(null);
}
}
}

/**
Expand Down

0 comments on commit bfdbaf8

Please sign in to comment.