BloomRpcServerResponse.created constructor

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

Factory for a created JSON response (status 201).

Implementation

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