@@ -27,18 +27,20 @@ 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 empty request body |
33+ | ` BinaryFileDecoder ` | ` DecoderInterface<BinaryFile> ` | Parses file information from the HTTP response and returns a ` BinaryFile ` DTO |
34+ | ` FormUrlencodedEncoder ` | ` EncoderInterface<?array> ` | Adds form urlencoded body and headers to request |
35+ | ` FormUrlencodedDecoder ` | ` DecoderInterface<array> ` | Converts form urlencoded response body to array |
36+ | ` JsonEncoder ` | ` EncoderInterface<?array> ` | Adds json body and headers to request |
37+ | ` JsonDecoder ` | ` DecoderInterface<array> ` | Converts json response body to array |
38+ | ` MultiPartEncoder ` | ` EncoderInterface<AbstractMultipartPart> ` | Adds symfony/mime ` AbstractMultipartPart ` as HTTP body. Handy for form data + files. |
39+ | ` StreamEncoder ` | ` EncoderInterface<StreamInterface> ` | Adds PSR-7 Stream as request body |
40+ | ` StreamDecoder ` | ` DecoderInterface<StreamInterface> ` | Returns the PSR-7 Stream as response result |
41+ | ` RawEncoder ` | ` EncoderInterface<string> ` | Adds raw string as request body |
42+ | ` RawDecoder ` | ` DecoderInterface<string> ` | Returns the raw PSR-7 body string as response result |
43+ | ` ResponseDecoder ` | ` DecoderInterface<ResponseInterface> ` | Returns the received PSR-7 response as result |
4244
4345## Built-in transport presets:
4446
@@ -49,6 +51,7 @@ We've composed some of the encodings above into pre-configured transports:
4951| ------------------------| -------------------------| ---------------------| ------------------------|
5052| ` BinaryDownloadPreset ` | ` null ` | ` BinaryFile ` | ` withEmptyRequest ` |
5153| ` BinaryDownloadPreset ` | ` AbstractMultipartPart ` | ` BinaryFile ` | ` withMultiPartRequest ` |
54+ | ` FormUrlencodedPreset ` | ` ?array ` | ` array ` | ` create ` |
5255| ` JsonPreset ` | ` ?array ` | ` array ` | ` create ` |
5356| ` PsrPreset ` | ` string ` | ` ResponseInterface ` | ` create ` |
5457| ` RawPreset ` | ` string ` | ` string ` | ` create ` |
0 commit comments