postJson method
Implementation
Future<HttpResponse> postJson(PeerId peerId, String path, Map<String, dynamic> data) {
final body = utf8.encode(jsonEncode(data));
final headers = {'content-type': 'application/json'};
return request(peerId, HttpMethod.post, path, headers: headers, body: body);
}