BloomRpcServerResponse.ok constructor

BloomRpcServerResponse.ok(
  1. dynamic body, {
  2. Map<String, String>? headers,
})

Factory for a successful JSON response (status 200).

Implementation

factory BloomRpcServerResponse.ok(dynamic body,
        {Map<String, String>? headers}) =>
    BloomRpcServerResponse(
      statusCode: 200,
      body: body,
      headers: headers ??
          const {'content-type': 'application/json; charset=utf-8'},
    );