searchByGlobalNamePrefix static method

Future<UserSearchResponseResponse> searchByGlobalNamePrefix(
  1. HttpClient client,
  2. String displayNamePrefix,
  3. int page
)

OBSOLETE Do not use this to search users, use SearchByGlobalNamePost instead.

Implementation

static Future<UserSearchResponseResponse> searchByGlobalNamePrefix (
    HttpClient client,
    String displayNamePrefix,
    int page,
) async {
    final Map<String, dynamic> params = Map<String, dynamic>();
    final String _displayNamePrefix = '$displayNamePrefix';
    final String _page = '$page';
    final HttpClientConfig config = HttpClientConfig('GET', '/User/Search/Prefix/$_displayNamePrefix/$_page/', params);
    config.bodyContentType = null;
    final HttpResponse response = await client.request(config);
    if(response.statusCode == 200) {
        return UserSearchResponseResponse.asyncFromJson(response.mappedBody);
    }
    throw Exception(response.mappedBody);
}