Questions tagged [micronaut-client]

104 questions
2
votes
1 answer

In micronaut-kafka, How can I use JAAS config to two different consumers from one application?

I have tried the approach mentioned on official documentations to override the bootstrap servers in kafka client config. https://micronaut-projects.github.io/micronaut-kafka/latest/guide/#kafkaClient However, in my case, I am getting one JaaS config…
2
votes
1 answer

How to add retries to Micronaut non-declarative http client

Micronaut supports retry mechanism for http clients if we use it in a declarative client like this : @Client("http://127.0.0.1:8200") @Retryable(delay = "${retry-delay}", attempts = "${retry-attempts}") @Header(name = "username", value =…
shashank
  • 65
  • 6
2
votes
1 answer

How to write a byte array to a cloud destination using Micronaut?

I'm converting a small Spring method to Micronaut. The purpose of this method is to write a byte array to a destination in the cloud. To identify the destination, a URI is passed as argument to the Spring method. This is the implementation using…
m-oliv
  • 419
  • 11
  • 27
2
votes
1 answer

Micronaut - Creating, Getting and Destroying ApplicationContext beans

I have a need to dynamically create and destroy HttpClient objects, to correspond with clients registering/deregistering themselves with my Micronaut application. As part of this I want to add them as beans to the application context so that they…
user2521119
  • 165
  • 2
  • 14
2
votes
1 answer

Required Body [file] not specified Micronaut Multipart upload

Trying to upload the file using declarative HTTP client as below Http CLient @Client("http://localhost:8080/product") public interface IHttpClient { @Post(consumes = MediaType.MULTIPART_FORM_DATA, produces = MediaType.MULTIPART_FORM_DATA) …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
2
votes
1 answer

How to pass the value @Body MultipartBody from curl or postman or swagger Micronaut

I have a simple below post method in Micronaut, which sends the image to the controller as shown below @Controller("/product") public class ProductController { @Post(consumes = MediaType.MULTIPART_FORM_DATA, produces =…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
2
votes
1 answer

How to get reactive streams in Micronaut?

In Spring Boot, for Webflux projects, we request a stream of data by sending a header - "Accept: application/stream+json" in the HTTP Request. If we send, "Accept: application/json", we get get a valid Json. In Micronaut, however, if I send "Accept:…
Anoop Hallimala
  • 625
  • 1
  • 11
  • 25
2
votes
0 answers

jackson:serializationInclusion: ALWAYS causing the error with Consul service discovery and Micronaut application

Registering the jackson to include NULL and EMPTY value to the micronaut application causing the error consul: client: defaultZone: ${CONSUL_HOST:localhost}:${CONSUL_PORT:8500} registration: enabled: true jackson: …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
2
votes
2 answers

Merging Schemas swagger UI Micronaut

I am trying to merge the additional files schema in micronaut swagger UI. I think the file is not picked up during the build time, quite not sure how to set the correct path for the additional file. Inside resource the additional file is present In…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
2
votes
1 answer

Cannot validate view.model.product.ProductSearchCriteria. No bean introspection present. Please add @Introspected to the class

Custom validator issue No bean introspection present. Please add @Introspected to the class and ensure Micronaut annotation processing is enabled not working Micronaut 2.2.1 @Retention(RetentionPolicy.RUNTIME) @Target({ METHOD, FIELD,…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
2
votes
2 answers

Micronaut HTTP Client - Deserialize generic type - For API Testing

For API testing I have to parse the response of a request using io.micronaut.http.client.HttpClient I prefer to use the format given below. Response response = client.toBlocking().retrieve(HttpRequest.POST("/", user),…
Sujith C P
  • 105
  • 1
  • 11
2
votes
3 answers

How do I get a byte[] (image) from a webservice using micronaunt HttpClient

I am porting a Grails 3.1 library for using some internal webservices to Grails 4.0. One of the services provides an image of a requested employee upon request. I am having difficulty implementing the (micronaut) HttpClient code to process the…
1
vote
1 answer

Call file upload API from Micronaut

I need to call an API and upload file Bytes Data with Micronaut It is similar what we use do to with OkHTTP like : Response uploadResult = okHttpClient.newCall(new Request.Builder() .url(uploadUrl) …
1
vote
0 answers

Error occurred reading HTTP response: Connection reset in Micronaut

I have a Micronaut application which calls other microservice using Micronaut declarative HTTP client. Sometimes we are getting error response which says Error occurred reading HTTP response: Connection reset. Below is the detail error. Can someone…
1
vote
1 answer

Micronaut Declarative Client Streaming and error handling

I have a client that consumes an input stream from a service, like this: @Client(value = 'http://localhost:8080/') interface StreamClient { @Get(uri = '/data', processes = MediaType.APPLICATION_OCTET_STREAM) @Header("Accept:…
sbglasius
  • 3,104
  • 20
  • 28