# Http Network Calls

Use the `ZipyHttpClient` to call http network calls in your flutter application

```dart
import 'package:zipy_flutter/zipy_flutter.dart';

final client = ZipyHttpClient();
client.get(url); or client.post(url);

```

Example-&#x20;

```dart
final client = ZipyHttpClient();
const String url = 'url';

final Map<String, String> headers = {
  'Content-Type': 'application/json',
  'Authorization': 'Bearer your_api_key',
};

try {
  final response = await client.get(
    Uri.parse(url),
    headers: headers,
  );
} catch (e) {
  print(e);
}
```

or

```dart
final client = ZipyHttpClient(); 
const baseUrl = 'url';
var request = http.Request('GET', Uri.parse(baseUrl));
http.StreamedResponse response = await client.send(request);
```

Use the instance of `client` to call the api by importing it wherever needed or you can call it in your network call wrapper.
