Commits

Blake Winton committed a93bbd8

Use a form instead. Next up, make it post json.

  • Participants
  • Parent commits 1e61898

Comments (0)

Files changed (1)

File packages/thunderbird-rest-api/lib/tb-rest-api.js

 function ApiListHandler() {
   this.handle = function(request, response) {
     var responseBody = "<html><title>APIs</title><body>" +
-        "<a href='post-facebook-message'>post-facebook-message</a>" +
+      "<form method='post' action='post-facebook-message'>" +
+      "<fieldset>" +
+        "<legend>post-facebook-message</legend>" +
+        "<table cellpadding='0' cellspacing='0' border='0'>" +
+          "<tr>" +
+            "<th><label for='subject'>Subject: </label></th>" +
+            "<td><input type='text' name='subject' id='subject' value=''/></td>" +
+          "</tr><tr>" +
+            "<th><label for='from'>From: </label></th>" +
+            "<td><input type='text' name='from' id='from' value=''/></td>" +
+          "</tr><tr>" +
+            "<th><label for='to'>To: </label></th>" +
+            "<td><input type='text' name='to' id='to' value=''/></td>" +
+          "</tr><tr>" +
+            "<th><label for='body'>Body: </label></th>" +
+            "<td><input type='text' name='body' id='body' value=''/></td>" +
+          "</tr><tr>" +
+            "<td colspan='2'>" +
+            "<input id='submit' type='submit' value='Test it out!'/>" +
+            "</td>" +
+          "</tr>" +
+        "</table>" +
+      "</fieldset>" +
+      "</form>" +
       "</body></html>";
     response.setStatusLine(request.httpVersion, 200, "OK");
     response.setHeader("Content-Type", "text/html", false);