<?php

declare(strict_types=1);
namespace Tests\Adawolfa\Retrofit;
use Adawolfa\Retrofit\HTTP\Body;
use Adawolfa\Retrofit\HTTP\Field;
use Adawolfa\Retrofit\HTTP\FormURLEncoded;
use Adawolfa\Retrofit\HTTP\GET;
use Adawolfa\Retrofit\HTTP\Header;
use Adawolfa\Retrofit\HTTP\Headers;
use Adawolfa\Retrofit\HTTP\POST;
use Adawolfa\Retrofit\HTTP\Query;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\StreamInterface;

interface Service extends ParentService
{

	#[GET('root')]
	public function root(): string;

	#[GET]
	public function returnMixed(): mixed;

	#[GET]
	public function returnNoReturn();

	#[GET]
	public function returnResponse(): ResponseInterface;

	#[GET]
	public function returnStream(): StreamInterface;

	#[GET]
	public function returnInt(): int;

	#[GET]
	#[Headers('A: 1', 'B:2')]
	#[Headers('C: 3')]
	#[Headers('C: 4')]
	public function headers(): void;

	#[GET]
	public function header(
		#[Header('A')] string $a,
		#[Header('A')] string $b,
	): void;

	#[GET('?a=a')]
	public function query(
		#[Query]      string $b,
		#[Query]      int    $c = 1,
		#[Query('x')] bool   $d = true,
		#[Query]      string $e = null,
	): void;

	#[POST]
	public function body(#[Body] $body): void;

	#[POST]
	#[FormURLEncoded]
	public function urlEncodedBody(#[Field] string $a): void;

}