8608279000f94639892d8b5d717192c26995ad7a35bb9dbff1c40848e669710a13eca907873ee1312d912b9a51f6bbad612b90c29489bd0af96ea5e4daaaaa 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. import { Subscriber } from '../../Subscriber';
  2. import { AjaxResponse } from './AjaxObservable';
  3. /**
  4. * @see {@link ajax}
  5. *
  6. * @interface
  7. * @name AjaxRequest
  8. * @noimport true
  9. */
  10. export class AjaxRequestDoc {
  11. /**
  12. * @type {string}
  13. */
  14. url: string = '';
  15. /**
  16. * @type {number}
  17. */
  18. body: any = 0;
  19. /**
  20. * @type {string}
  21. */
  22. user: string = '';
  23. /**
  24. * @type {boolean}
  25. */
  26. async: boolean = false;
  27. /**
  28. * @type {string}
  29. */
  30. method: string = '';
  31. /**
  32. * @type {Object}
  33. */
  34. headers: Object = null;
  35. /**
  36. * @type {number}
  37. */
  38. timeout: number = 0;
  39. /**
  40. * @type {string}
  41. */
  42. password: string = '';
  43. /**
  44. * @type {boolean}
  45. */
  46. hasContent: boolean = false;
  47. /**
  48. * @type {boolean}
  49. */
  50. crossDomain: boolean = false;
  51. /**
  52. * @type {boolean}
  53. */
  54. withCredentials: boolean = false;
  55. /**
  56. * @return {XMLHttpRequest}
  57. */
  58. createXHR(): XMLHttpRequest {
  59. return null;
  60. }
  61. /**
  62. * @type {Subscriber}
  63. */
  64. progressSubscriber: Subscriber<any> = null;
  65. /**
  66. * @param {AjaxResponse} response
  67. * @return {T}
  68. */
  69. resultSelector<T>(response: AjaxResponse): T {
  70. return null;
  71. }
  72. /**
  73. * @type {string}
  74. */
  75. responseType: string = '';
  76. }