http.post.js 333 B

12345678910111213
  1. /*
  2. http.post Request the content from URL with POST method, with optional JSON string data
  3. */
  4. requirelib("http")
  5. //Get the login page information from API endpoint
  6. var dirinfo = http.post("http://localhost:8080/system/file_system/listDir", JSON.stringify({
  7. dir: "user:/Desktop",
  8. sort: "default"
  9. }));
  10. sendResp(dirinfo);