put method

  1. @override
Future<ParseNetworkResponse> put(
  1. String path, {
  2. String? data,
  3. ParseNetworkOptions? options,
})
override

Implementation

@override
Future<ParseNetworkResponse> put(String path,
    {String? data, ParseNetworkOptions? options}) async {
  try {
    final dio.Response<String> dioResponse = await _client.put<String>(
      path,
      data: data,
      options: _Options(headers: options?.headers),
    );

    return ParseNetworkResponse(
      data: dioResponse.data!,
      statusCode: dioResponse.statusCode!,
    );
  } on dio.DioException catch (error) {
    return ParseNetworkResponse(
      data: error.response?.data ?? _fallbackErrorData,
      statusCode: error.response?.statusCode ?? ParseError.otherCause,
    );
  }
}