put<T> method

Future<SmartApiResponse<T>> put<T>(
  1. String endpoint, {
  2. dynamic body,
  3. List<SmartApiFile>? files,
  4. Map<String, dynamic>? queryParams,
  5. bool? autoDetectFiles,
  6. bool forceRaw = false,
  7. T fromJson(
    1. dynamic
    )?,
  8. bool showLoader = true,
})

Sends a PUT request to endpoint. Same auto raw/multipart detection as post applies to body and files, including forceRaw.

Implementation

Future<SmartApiResponse<T>> put<T>(String endpoint,
        {dynamic body,
        List<SmartApiFile>? files,
        Map<String, dynamic>? queryParams,
        bool? autoDetectFiles,
        bool forceRaw = false,
        T Function(dynamic)? fromJson,
        bool showLoader = true}) =>
    call<T>(
        SmartApiRequest(
          endpoint: endpoint,
          method: ApiMethod.put,
          body: body,
          files: files,
          queryParams: queryParams,
          autoDetectFiles: autoDetectFiles,
          forceRaw: forceRaw,
          showLoader: showLoader,
        ),
        fromJson: fromJson);