retrofit.dart
retrofit.dart copied to clipboard
contentType is the string "null"
Hi.
When using the retrofit_generator, if the Options() is passed to the option parameter. Request header "Content-Type" is set to "null" in the header, an error occurs on line 1204 of the generator.dart file. https://github.com/trevorwang/retrofit.dart/blob/master/generator/lib/src/generator.dart#L1204
This issue was introduced in the MR 057ee3763087ebfbcb61bc5a9483358eab695bd4. To fix this error, it is necessary to use 'contentType: options.contentType?.toString()'.