http icon indicating copy to clipboard operation
http copied to clipboard

Invalid header field name, with 44

Open cdzc opened this issue 5 years ago • 2 comments

I report this exception when I use the following request:

final http.Response response = await http.get(
  url,
  headers: <String,String>{
    HttpHeaders.contentTypeHeader: 'application/json; charset=UTF-8',
    HttpHeaders.authorizationHeader:"Bearer " + token,
   },
);
print('response=' + response.body);

[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: Invalid header field name, with 44 #0 IOClient.send (package:http/src/io_client.dart:62:7) #1 BaseClient._sendUnstreamed (package:http/src/base_client.dart:91:38) #2 BaseClient.get (package:http/src/base_client.dart:27:7) #3 get. (package:http/http.dart:46:36)

cdzc avatar Aug 14 '20 09:08 cdzc

Hi @zxy888, please check this issue

Please, share more related code statements.

valehasadli avatar Sep 19 '20 23:09 valehasadli

There is not enough context to debug this. Could you provide a complete reproduction example.

brianquinlan avatar Jan 13 '24 00:01 brianquinlan