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.

61 lines
1.4 KiB

3 years ago
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @copyright Copyright (c) 2016, ownCloud, Inc.
  5. *
  6. * @author Lukas Reschke <lukas@statuscode.ch>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Roeland Jago Douma <roeland@famdouma.nl>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. namespace OCP\Http\Client;
  27. /**
  28. * Interface IResponse
  29. *
  30. * @since 8.1.0
  31. */
  32. interface IResponse {
  33. /**
  34. * @return string|resource
  35. * @since 8.1.0
  36. */
  37. public function getBody();
  38. /**
  39. * @return int
  40. * @since 8.1.0
  41. */
  42. public function getStatusCode(): int;
  43. /**
  44. * @param string $key
  45. * @return string
  46. * @since 8.1.0
  47. */
  48. public function getHeader(string $key): string;
  49. /**
  50. * @return array
  51. * @since 8.1.0
  52. */
  53. public function getHeaders(): array;
  54. }