This repository has been archived by the owner on Jan 17, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(http-client): Decouple components of Http clients
- Extract ApiServerClientFactory from ApiSeverClient - Create CoroutinePool for coroutine scheduling and error handling - Improve coroutines handling and testing
- Loading branch information
Showing
23 changed files
with
472 additions
and
279 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace K911\Swoole\Client\Exception; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class UnsupportedContentTypeException extends \InvalidArgumentException | ||
{ | ||
/** | ||
* @param string $contentType | ||
* @param string[] $allowed | ||
* | ||
* @return UnsupportedContentTypeException | ||
*/ | ||
public static function forContentType(string $contentType, array $allowed): self | ||
{ | ||
return new self(\sprintf('Content-Type "%s" is not supported. Only "%s" are supported.', $contentType, \implode(', ', $allowed))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace K911\Swoole\Client\Exception; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class UnsupportedHttpMethodException extends \InvalidArgumentException | ||
{ | ||
/** | ||
* @param string $method | ||
* @param string[] $allowed | ||
* | ||
* @return UnsupportedHttpMethodException | ||
*/ | ||
public static function forMethod(string $method, array $allowed): self | ||
{ | ||
return new self(\sprintf('Http method "%s" is not supported. Only "%s" are supported.', $method, \implode(', ', $allowed))); | ||
} | ||
} |
Oops, something went wrong.