spring_boot_starter_feign 0.1.7
spring_boot_starter_feign: ^0.1.7 copied to clipboard
Feign clients for spring_boot_dart: annotate an interface with @FeignClient and @GetMapping, inject it as a bean; JSON via ObjectMapper, interceptors, retries, fallbacks.
0.1.7 #
@GetMapping()without a path calls theurlandpathof the client itself.requiredanddefaultValueof@RequestParam/@RequestHeaderandrequiredof@PathVariable:defaultValueis sent for anullargument; a requirednullfails the call with anArgumentErrornaming the parameter before anything is sent; anullthat is not required leaves a query parameter or header out (a path variable becomes an empty string).spring.cloud.openfeign.client.config.*keys with relaxed names, like Spring Cloud OpenFeign's binding:readTimeout,loggerLevel,defaultRequestHeaders.X-Shop,read_timeout, environment variables- Breaking:
Mapparameters of@RequestParam/@RequestHeadergive one query parameter / header per entry (they were sent as JSON); an object as the value of a path variable, query parameter, header or cookie (a class written as a JSON object) stops the application at startup, or fails the call with anEncodeExceptionwhen only the value tells. - Breaking: mapping
headersuse Spring's'Name=value'(as Spring Cloud OpenFeign reads them; server conditions like'!Name'are ignored);'Name: value'stops the application with the reason. - Breaking:
read-timeoutis the longest wait for data (for the response, then between two chunks of the body), not a limit for the whole call; defaultread-timeout60 s andconnect-timeout10 s, like Feign'sRequest.Options()(0for none). - Breaking:
RequestTemplate.headeradds a value like Feign's (it replaced); newremoveHeader. Interceptors run for every attempt of a call on a new template (a refreshed token reaches the retry);default-request-headers(and the defaultAccept) are applied after the interceptors, for names they did not set. - Breaking:
dismiss404keeps throwing forvoidmethods, like Feign. - Breaking: the
<--- ERRORand---> RETRYINGlog lines are written only abovelogger-level: none. @FeignClient(contextId:, qualifiers:, primary:, dismiss404:)like Spring Cloud OpenFeign (primaryandqualifiersneed the matching generator).default-query-parameters.<name>,follow-redirects,spring.cloud.openfeign.client.decode-slash(defaulttrue: a/in a path variable stays a/).@CookieValueparameters (oneCookieheader).DefaultErrorDecoderreadsRetry-Afteras an HTTP date too.- README: more "Differences from Spring Cloud OpenFeign" (default
Accept, spaces as+, maskedAuthorization, logger names).
0.1.6 #
- update road map
- ci: release with a button on main, skip new packages when publishing; shorter pubspec descriptions
0.1.5 #
- Initial version: @FeignClient interfaces with request mapping annotations, JSON through ObjectMapper, interceptors, error decoding, retries, fallbacks, spring.cloud.openfeign.client.config.* properties.
- Server-sent events: methods returning
EventStream<T>(orStream<T>) readtext/event-streamresponses, decode each event's data, reconnect withLast-Event-ID(event-stream.*properties; not in Spring Cloud OpenFeign).