searchByGlobalNamePost static method

Future<UserSearchResponseResponse> searchByGlobalNamePost(
  1. HttpClient client,
  2. int page,
  3. UserSearchPrefixRequest body
)

Given the prefix of a global display name, returns all users who share that name.

Implementation

static Future<UserSearchResponseResponse> searchByGlobalNamePost (
    HttpClient client,
    int page,
    UserSearchPrefixRequest body
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _page = '$page';
    final HttpClientConfig config = HttpClientConfig('POST', '/User/Search/GlobalName/$_page/', params);
    config.body = await body.asyncToJson();
    config.bodyContentType = 'application/json';
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return UserSearchResponseResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}