Skip to content

Commit 93909b7

Browse files
committed
refactor: eta-reduction of call to request.setRequestHeader
1 parent 00a012a commit 93909b7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/src/client/transport/xhr_transport.dart

+1-3
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,7 @@ class XhrClientConnection implements ClientConnection {
161161

162162
void _initializeRequest(
163163
XMLHttpRequest request, Map<String, String> metadata) {
164-
metadata.forEach((key, value) {
165-
request.setRequestHeader(key, value);
166-
});
164+
metadata.forEach(request.setRequestHeader);
167165
// Overriding the mimetype allows us to stream and parse the data
168166
request.overrideMimeType('text/plain; charset=x-user-defined');
169167
request.responseType = 'text';

0 commit comments

Comments
 (0)