chopper 8.4.0
chopper: ^8.4.0 copied to clipboard
Chopper is an http client generator using source_gen, inspired by Retrofit
Changelog #
8.4.0 #
- Add
@AbortTriggerannotation and support for abortable requests (#679) - Change the timeout mechanism to use
httppackage's built-inabortTriggerrather thanFuture'stimeout(#679) - Require Dart SDK 3.7.0 (#683)
8.0.4 #
- Update dependencies
8.0.3 #
- Remove unnecessary library name
8.0.1+1 #
- Re-remove internal
qs.ListFormatwrapper
8.0.1 #
8.0.0 #
- Add per-request timeout (#604)
- BREAKING CHANGE:
- Restructure interceptors (#547)
RequestInterceptorand FunctionRequestInterceptors are removedResponseInterceptorand FunctionResponseInterceptors are removed- See Migrating to 8.0.0 for more information and examples
- add
onlyErrorsoption toHttpLoggingInterceptor(#610)
- Restructure interceptors (#547)
7.4.0 #
7.1.0+1 #
- Bump
chopper_generatorversion requirement to 7.1.0
7.1.0 #
7.0.10 #
- Enable the user to specify non-String type header values by calling
.toString()on any non-String Dart type. (#538)
7.0.9 #
7.0.6 #
7.0.1 #
- Refactor ChopperClient constructor
- Refactor ChopperClient.getService
- Refactor CurlInterceptor
6.1.4 #
- Fix Multipart for List
6.1.3 #
6.1.2 #
- Packages upgrade, constraints upgrade
6.1.1 #
- EquatableMixin for Request, Response and PartValue
6.1.0 #
- HttpLogging interceptor more configurable
- Apply headers field name case insensitive.
6.0.0 #
- Replaced the String based path with Uri (BREAKING CHANGE)
- Fix for Authenticator body rewrite
5.2.0 #
- Replaced the String based path with Uri (BREAKING CHANGE)
- Fix for Authenticator body rewrite
5.1.0 #
- Base class changed for http.BaseRequest
- Annotation to include null vars in query
5.0.1 #
- mapToQuery changes
5.0.0 #
- API breaking changes (FutureOr)
4.0.1 #
- Fix for the null safety support
4.0.0 #
- Null safety support
- Fix infinite loop when using Authenticators
- Remove deprecated
FileField, usePartFileinstead - Remove deprecated
Request.replace, useRequest.copyWithinstead - Remove deprecated
PartValue.replace, usePartValue.copyWithinstead - Remove deprecated
Response.replace, useResponse.copyWithinstead - Support for OPTIONS requests
- Support for passing data in the body of GET requests (anti-pattern, but requested)
- Support for OkHttp-like Authenticator implementation
- Support for generic API methods
- Updated public API documentation and how-tos
3.0.3 #
- Packages upgrade
3.0.2 #
- Update analyzer
- On
ResponseandRequest, deprecatereplacemethod, usecopyWithinstead
3.0.1+1 #
- Documentations update
3.0.1 #
- ResponseInterceptor function support typed parameter
- Fix JsonConverter when converting core types
3.0.0 #
Breaking change New way to handle errors if (response.isSuccessful) { final body = response.body; } else { final error = response.error; }
- Fix error handling by introducing
Response.errorgetter - Remove
onErrorsince every response are available viaonResponsestream
2.5.0 #
- Unsuccessful response are not throw anymore, use
Response.isSuccessfulgetter orstatusCodeinstead - Support HEAD request
2.4.2 #
-
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 overrideonapplyHeader(s)functions, true by default -
support
List<MultipartFile>
2.4.1 #
- Deprecate
@FieldField, use@PartFileinstead
2.4.0 #
- Breaking Change
Response.baseis now aBaseRequestinstead of aRequest, which means that you can't do base.body now. Please use Response.bodyBytes or Response.bodyString instead for non streaming case. - Now supports streams !
- You can pass
Stream<List<int>>as a body to a request - You can also use
Stream<List<int>>as the BodyType for the response, in this case the returned response will contain a stream inbody.
- You can pass
- Support passing
MutlipartFile(from packages:http) directly to@FileFieldannotation
2.3.2 #
- Fix trailing slash when path empty
2.3.1 #
- Default value for a path is now
''instead of '/' - Do not send null value for Multipart request
2.3.0 #
- Breaking Change
ChopperClient.errorConverteris now taking anErrorConverteras a parameterabstract class ErrorConverter { FutureOr<Response> convertError<ResultType, ItemType>(Response response); } - Remove deprecated
Chopper.service<Type>(Type) - Add
QueryMapannotation - Fix https://github.com/lejard-h/chopper/issues/28
- Fix https://github.com/lejard-h/chopper/issues/21
- Fix https://github.com/lejard-h/chopper/issues/37
2.2.0 #
-
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
2.1.0 #
- fix casting issue
2.0.0 #
- Fix type safety
- Fix json converter
- Handle BuiltList
2.0.0 #
-
Request is now containing baseUrl
-
Can call
Request.toHttpRequest()direclty to get thehttp.BaseRequestwill 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
CurlInterceptorthanks @edwardaux -
Add
HttpLoggingInterceptor -
Add
FactoryConverterannotation@FactoryConverter(request: convertRequest, response: convertResponse) -
BreakingChange
- Method.url renamed to path
Converter.encodeandConverter.decoderemoved, implementConverter.convertResponseand Converter.convertRequest` insteadChopperClient.jsonApideprecated, use aJsonConverterinsteadChopperClient.formUrlEncodedApi, useFormUrlEncodedConverterinstead- remove
JsonEncodedannotation, useFactoryConverterinstead
1.1.0 #
-
BreakingChange Removed
nameparameter onChopperApiNew way to instanciate a service@ChopperApi() abstract class MyService extends ChopperService { static MyService create([ChopperClient client]) => _$MyService(client); }
1.0.0 #
- Multipart request
- form url encoded
- add jsonAPI and formUrlEncodedApi boolean to ChopperClient
- json and formUrlEncoding are now builtin
onError,onResponse,onRequeststream- error converter
- add withClient constructor
0.1.1 #
- Remove trimSlashes
0.1.0 #
- update dart sdk
0.0.2 #
-
the generated extension is now
*.chopper.dart -
rename
ServiceDefinitiontoChopperApi -
rename
ChopperClient.servicesfield toChopperClient.apis
0.0.1 #
- Initial version, created by Stagehand



