Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions json_client/web/json_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import 'package:json_object/json_object.dart';
import 'dart:json' as JSON;

import 'dart:core' as core;
import 'dart:convert';


var host = "127.0.0.1:8080";
Expand Down Expand Up @@ -85,8 +86,8 @@ void saveData(_) {

// POST the data to the server
var url = "http://$host/programming-languages";
request.open("POST", url, false);
request.send(JSON.stringify(jsonObject));
request.open("POST", url, async:false);
request.send(JSON.encode(jsonObject));
}


Expand Down Expand Up @@ -114,4 +115,4 @@ class LanguageImpl extends JsonObject implements Language {
return new JsonObject.fromJsonString(string, new LanguageImpl());
}

}
}