getJsonPropertyAsStringWithHttpInfo method

Future<Response> getJsonPropertyAsStringWithHttpInfo(
  1. String property,
  2. Object body
)

Utility function to extract properties from JSON objects in language where this is cumbersome.

Note: This method returns the HTTP Response.

Parameters:

  • String property (required): JSON property name or dot separated path selector such as a.b.c

  • Object body (required):

Implementation

Future<Response> getJsonPropertyAsStringWithHttpInfo(String property, Object body,) async {
  // ignore: prefer_const_declarations
  final path = r'/user/json/pluck';

  // ignore: prefer_final_locals
  Object? postBody = body;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

    queryParams.addAll(_queryParams('', 'property', property));

  const contentTypes = <String>['application/json'];


  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}