@@ -27,18 +27,21 @@ Examples:
2727
2828This package contains some frequently used encoders / decoders for you:
2929
30- | Class | EncodingType<DataType > | Action |
31- | ---------------------| ---------------------------------------| -------------------------------------------------------------------------------------|
32- | ` EmptyBodyEncoder ` | ` EncoderInterface<null> ` | Creates epmty request body |
33- | ` BinaryFileDecoder ` | ` DecoderInterface<BinaryFile> ` | Parses file information from the HTTP response and returns a ` BinaryFile ` DTO |
34- | ` JsonEncoder ` | ` EncoderInterface<?array> ` | Adds json body and headers to request |
35- | ` JsonDecoder ` | ` DecoderInterface<array> ` | Converts json response body to array |
36- | ` MultiPartEncoder ` | ` EncoderInterface<AbstractMultipartPart> ` | Adds symfony/mime ` AbstractMultipartPart ` as HTTP body. Handy for form data + files. |
37- | ` StreamEncoder ` | ` EncoderInterface<StreamInterface> ` | Adds PSR-7 Stream as request body |
38- | ` StreamDecoder ` | ` DecoderInterface<StreamInterface> ` | Returns the PSR-7 Stream as response result |
39- | ` RawEncoder ` | ` EncoderInterface<string> ` | Adds raw string as request body |
40- | ` RawDecoder ` | ` DecoderInterface<string> ` | Returns the raw PSR-7 body string as response result |
41- | ` ResponseDecoder ` | ` DecoderInterface<ResponseInterface> ` | Returns the received PSR-7 response as result |
30+ | Class | EncodingType<DataType > | Action |
31+ | -------------------------| ---------------------------------------| -------------------------------------------------------------------------------------|
32+ | ` EmptyBodyEncoder ` | ` EncoderInterface<null> ` | Creates epmty request body |
33+ | ` BinaryFileDecoder ` | ` DecoderInterface<BinaryFile> ` | Parses file information from the HTTP response and returns a ` BinaryFile ` DTO |
34+ | ` FormUrlencodedDecoder ` | ` DecoderInterface<array> ` | Converts form urlencoded response body to array |
35+ | ` FormUrlencodedEncoder ` | ` EncoderInterface<?array> ` | Adds form urlencoded body and headers to request |
36+ | ` JsonDecoder ` | ` DecoderInterface<array> ` | Converts json response body to array |
37+ | ` JsonEncoder ` | ` EncoderInterface<?array> ` | Adds json body and headers to request |
38+ | ` JsonDecoder ` | ` DecoderInterface<array> ` | Converts json response body to array |
39+ | ` MultiPartEncoder ` | ` EncoderInterface<AbstractMultipartPart> ` | Adds symfony/mime ` AbstractMultipartPart ` as HTTP body. Handy for form data + files. |
40+ | ` StreamEncoder ` | ` EncoderInterface<StreamInterface> ` | Adds PSR-7 Stream as request body |
41+ | ` StreamDecoder ` | ` DecoderInterface<StreamInterface> ` | Returns the PSR-7 Stream as response result |
42+ | ` RawEncoder ` | ` EncoderInterface<string> ` | Adds raw string as request body |
43+ | ` RawDecoder ` | ` DecoderInterface<string> ` | Returns the raw PSR-7 body string as response result |
44+ | ` ResponseDecoder ` | ` DecoderInterface<ResponseInterface> ` | Returns the received PSR-7 response as result |
4245
4346## Built-in transport presets:
4447
@@ -49,6 +52,7 @@ We've composed some of the encodings above into pre-configured transports:
4952| ------------------------| -------------------------| ---------------------| ------------------------|
5053| ` BinaryDownloadPreset ` | ` null ` | ` BinaryFile ` | ` withEmptyRequest ` |
5154| ` BinaryDownloadPreset ` | ` AbstractMultipartPart ` | ` BinaryFile ` | ` withMultiPartRequest ` |
55+ | ` FormUrlencodedPreset ` | ` ?array ` | ` array ` | ` create ` |
5256| ` JsonPreset ` | ` ?array ` | ` array ` | ` create ` |
5357| ` PsrPreset ` | ` string ` | ` ResponseInterface ` | ` create ` |
5458| ` RawPreset ` | ` string ` | ` string ` | ` create ` |
0 commit comments