RestClientInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Rest;
  6. /**
  7. * Temando Rest HTTP Client Adapter
  8. *
  9. * @package Temando\Shipping\Rest
  10. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  11. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  12. * @link http://www.temando.com/
  13. */
  14. interface RestClientInterface
  15. {
  16. /**
  17. * @param string $uri
  18. * @param string $rawBody
  19. * @param string[] $headers
  20. * @return string
  21. */
  22. public function post($uri, $rawBody, array $headers);
  23. /**
  24. * @param string $uri
  25. * @param string $rawBody
  26. * @param string[] $headers
  27. * @return string
  28. */
  29. public function put($uri, $rawBody, array $headers);
  30. /**
  31. * @param string $uri
  32. * @param string $rawBody
  33. * @param string[] $headers
  34. * @return string
  35. */
  36. public function patch($uri, $rawBody, array $headers);
  37. /**
  38. * @param string $uri
  39. * @param string[] $queryParams
  40. * @param string[] $headers
  41. *
  42. * @return string
  43. */
  44. public function get($uri, array $queryParams, array $headers);
  45. /**
  46. * @param string $uri
  47. * @param string[] $headers
  48. *
  49. * @return mixed
  50. */
  51. public function delete($uri, array $headers);
  52. }