### Method of HttpClient in flutter
request() async {
try {
HttpClient httpClient = HttpClient();
HttpClientRequest request = await httpClient
.getUrl(Uri.parse('https://jsonplaceholder.typicode.com/posts/1'));
request.headers.add('token', 'secureTokenString');
HttpClientResponse response = await request.close();
var text = await response.transform(utf8.decoder).join();
httpClient.close();
debugPrint(text);
} catch (e) {
debugPrint('Failure ... : $e');
}
}