UpdateEmotion.cs 579 B

123456789101112131415161718192021
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using System.Net.ApiService;
  5. using System.Text.Json;
  6. namespace Speech {
  7. [Route("emotions")]
  8. public class UpdateEmotion {
  9. [Route("/update.cgi", HttpMethod.POST)]
  10. public static Response Update(RequestHeader req) {
  11. Response res = new Response();
  12. JsonDocument.Parse(req.Post["deviceemotion"], new JsonDocumentOptions() { MaxDepth=5, AllowTrailingCommas = true });
  13. res.FromString(200,"{\"status\":\"ok\"}");
  14. return res;
  15. }
  16. }
  17. }