- build yaml update
- Analyzer update
- Documentations update
- Generate code compatible with pedantic analysis option
- Fix factory converter
- Fix Avoid using braces in interpolation when not needed
- Maintenance release to support last version of
chopper
package (3.0.0) that introduced a breaking change on error handling
- Unsuccessful response are not throw anymore, use
Response.isSuccessful
getter orstatusCode
instead - Support HEAD request
-
Fix on JsonConverter If content type header overrided using @Post(headers: {'content-type': '...'}) The converter won't add json header and won't apply json.encode if content type is not JSON
-
add
bool override
onapplyHeader(s)
functions, true by default -
support
List<MultipartFile>
- Fix PartValue cast
- Deprecate
@FileField
, use@PartFile
instead - support
chopper: ^2.4.1
fix trailing slash when empty path
- update analyzer to
0.35.0
- do not set to null explicitly
- Fixed @Path issue, thanks to @kiruto
- update
built_collection
to4.0.0
- Breaking Change
ChopperClient.errorConverter
is now taking anErrorConverter
as a parameterabstract class ErrorConverter { FutureOr<Response> convertError<ResultType, ItemType>(Response response); }
- Remove deprecated
Chopper.service<Type>(Type)
- Add
QueryMap
annotation - Fix lejard-h/chopper#28
- Fix lejard-h/chopper#21
- Fix lejard-h/chopper#37
-
Fix converter issue on List
- Breaking Change
on
Converter.convertResponse<ResultType>(response)
, it take a new generic type =>Converter.convertResponse<ResultType, ItemType>(response)
- Breaking Change
on
-
deprecated
Chopper.service<Type>(Type)
, useChopper.getservice<Type>()
instead thanks to @MichaelDark
- fix casting issue
-
Request is now containing baseUrl
-
Can call
Request.toHttpRequest()
direclty to get thehttp.BaseRequest
will receive -
If a full url is specified in the
path
(ex: @Get(path: 'https://...')), it won't be concaten with the baseUrl of the ChopperClient and the ChopperAPI -
Add
CurlInterceptor
thanks @edwardaux -
Add
HttpLoggingInterceptor
-
Add
FactoryConverter
annotation@FactoryConverter(request: convertRequest, response: convertResponse)
-
BreakingChange
- Method.url renamed to path
Converter.encode
andConverter.decode
removed, implementConverter.convertResponse
and Converter.convertRequest` insteadChopperClient.jsonApi
deprecated, use aJsonConverter
insteadChopperClient.formUrlEncodedApi
, useFormUrlEncodedConverter
instead- remove
JsonEncoded
annotation, useFactoryConverter
instead
- BreakingChange
Removed
name
parameter onChopperApi
New way to instanciate a servicedart @ChopperApi() abstract class MyService extends ChopperService { static MyService create([ChopperClient client]) => _$MyService(client); }
- update build package
- Multipart request
- form url encoded
- add jsonAPI and formUrlEncodedApi boolean to ChopperClient
- json and formUrlEncoding are now builtin
onError
,onResponse
,onRequest
stream- error converter
- add withClient constructor
- update dart sdk
-
the generated extension is now
*.chopper.dart
-
rename
ServiceDefinition
toChopperApi
-
rename
ChopperClient.services
field toChopperClient.apis
- Initial version, created by Stagehand