http_request.d.ts 954 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import {Endpoint} from './endpoint';
  2. /**
  3. * The low level HTTP request object, encapsulating all HTTP header and body data sent by a service request.
  4. */
  5. export class HttpRequest {
  6. /**
  7. * Constructs HttpRequest object with provided endpoint and region
  8. */
  9. constructor(endpoint: Endpoint, region: string);
  10. /**
  11. * The part of the path excluding the query string.
  12. */
  13. pathname(): string;
  14. /**
  15. * The query string portion of the path.
  16. */
  17. search: string;
  18. /**
  19. * The request body payload.
  20. */
  21. body: string | Buffer;
  22. /**
  23. * The endpoint for the request.
  24. */
  25. endpoint: Endpoint;
  26. /**
  27. * A map of header keys and their respective values.
  28. */
  29. headers: {
  30. [key: string]: string;
  31. }
  32. /**
  33. * The HTTP method of the request.
  34. */
  35. method: string;
  36. /**
  37. * The path portion of the URI, e.g., "/list/?start=5&num=10".
  38. */
  39. path: string;
  40. }