addConfig method

Future<ParseResponse> addConfig(
  1. String key,
  2. dynamic value
)

Adds a new config

Implementation

Future<ParseResponse> addConfig(String key, dynamic value) async {
  try {
    final String uri = '${ParseCoreData().serverUrl}/config';
    final String body =
        '{"params":{"$key": ${json.encode(parseEncode(value))}}}';
    final ParseNetworkResponse result = await _client.put(uri, data: body);
    return handleResponse<ParseConfig>(
        this, result, ParseApiRQ.addConfig, _debug, parseClassName);
  } on Exception catch (e) {
    return handleException(e, ParseApiRQ.addConfig, _debug, parseClassName);
  }
}