wooMediaProxy static method

Future wooMediaProxy({
  1. required String path,
  2. String method = 'GET',
  3. Map<String, dynamic>? body,
})

Calls secureOps Cloud Function to proxy a WordPress Media API call.

Implementation

static Future<dynamic> wooMediaProxy({
  required String path,
  String method = 'GET',
  Map<String, dynamic>? body,
}) async {
  try {
    return await callSecureOps({
      'action': 'wooMediaProxy',
      'method': method,
      'path': path,
      'body': body,
    });
  } catch (e, st) {
    NeomErrorLogger.recordError(e, st, module: 'neom_core', operation: 'wooMediaProxy');
    return null;
  }
}