You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doctor_app_flutter/lib/client/app_client.dart

18 lines
545 B
Dart

import 'package:doctor_app_flutter/config/config.dart';
import 'package:http/http.dart' as http;
// OWNER : Ibrahim albitar
// DATE : 22-04-2020
// DESCRIPTION : Custom App client to pin base url for all srvices
class AppClient {
static Future<dynamic> post(dynamic path, {dynamic body}) async {
String _fullUrl = BASE_URL + path;
final response = await http.post(_fullUrl, body: body, headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
});
return response;
}
}