Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Future main() async {
- var http2 = new http.Client();
- var clientID = "com.wildfire.mobile";
- var clientSecret = "myspecialsecret ";
- var body = "username=usr&password=pwd&grant_type=password";
- var clientCredentials = new Base64Encoder().convert(
- "$clientID:$clientSecret".codeUnits);
- var response = await
- http.post(
- "http://localhost:8081/auth/token",
- headers: {
- "Content-Type": "application/x-www-form-urlencoded",
- "Authorization": "Basic $clientCredentials"
- },
- body: body);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement