[SEVERE] service_proxy: Bad state: Cannot modify a closed response.
Bad state: Cannot modify a closed response.
package:angel3_framework/src/core/response_context.dart 309:7 ResponseContext.serialize
package:angel3_framework/src/core/server.dart 280:20 Angel.executeHandler.<fn>
dart:async _CustomZone.runUnary
package:angel3_framework/src/core/driver.dart 414:22 Driver.runPipeline
package:angel3_hot/angel3_hot.dart 119:14 HotReloader.handleRequest
I think it was caused by the json() should not return the type of ResponseContext.
In addition, in serialize(value, {MediaType? contentType}), this.contentType will set to optional param contentType, so I think the code of ..contentType = MediaType('application', 'json') in json() is unavailing.
When I writen a simple api like this:
I got this error:
I think it was caused by the
json()
should not return the type ofResponseContext
. In addition, inserialize(value, {MediaType? contentType})
,this.contentType
will set to optional paramcontentType
, so I think the code of..contentType = MediaType('application', 'json')
injson()
is unavailing.