index.cjs 997 B

123456789101112131415161718192021222324252627
  1. 'use strict';
  2. var core = require('@tauri-apps/api/core');
  3. exports.MediaType = void 0;
  4. (function (MediaType) {
  5. MediaType["TEXT_PLAIN"] = "text/plain";
  6. MediaType["TEXT_HTML"] = "text/html";
  7. MediaType["TEXT_CSS"] = "text/css";
  8. MediaType["TEXT_CSV"] = "text/csv";
  9. MediaType["APPLICATION_JSON"] = "application/json";
  10. MediaType["APPLICATION_LD_JSON"] = "application/ld+json";
  11. MediaType["APPLICATION_XML"] = "application/xml";
  12. MediaType["TEXT_XML"] = "text/xml";
  13. MediaType["APPLICATION_FORM"] = "application/x-www-form-urlencoded";
  14. MediaType["APPLICATION_OCTET"] = "application/octet-stream";
  15. MediaType["MULTIPART_FORM"] = "multipart/form-data";
  16. })(exports.MediaType || (exports.MediaType = {}));
  17. async function execute(request) {
  18. return await core.invoke('plugin:relay|execute', { request });
  19. }
  20. async function cancel(requestId) {
  21. return await core.invoke('plugin:relay|cancel', { requestId });
  22. }
  23. exports.cancel = cancel;
  24. exports.execute = execute;