Simple email application for Android. Original source code: https://framagit.org/dystopia-project/simple-email
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
778 B

  1. 'use strict';
  2. const pkg = require('../package.json');
  3. const create = require('./create');
  4. const defaults = {
  5. options: {
  6. retry: {
  7. retries: 2,
  8. methods: [
  9. 'GET',
  10. 'PUT',
  11. 'HEAD',
  12. 'DELETE',
  13. 'OPTIONS',
  14. 'TRACE'
  15. ],
  16. statusCodes: [
  17. 408,
  18. 413,
  19. 429,
  20. 500,
  21. 502,
  22. 503,
  23. 504
  24. ]
  25. },
  26. headers: {
  27. 'user-agent': `${pkg.name}/${pkg.version} (https://github.com/sindresorhus/got)`
  28. },
  29. hooks: {
  30. beforeRequest: [],
  31. beforeRedirect: [],
  32. beforeRetry: [],
  33. afterResponse: []
  34. },
  35. decompress: true,
  36. throwHttpErrors: true,
  37. followRedirect: true,
  38. stream: false,
  39. form: false,
  40. json: false,
  41. cache: false,
  42. useElectronNet: false
  43. },
  44. mutableDefaults: false
  45. };
  46. const got = create(defaults);
  47. module.exports = got;