Questions tagged [micronaut-client]

104 questions
1
vote
2 answers

How do I route a request using a discriminator and declarative client?

Use case I'm trying to call a service, using a micronaut declarative client. The service is actually many services all the same, but hosted on a different host for each tenet in our system. e.g. tenetA.example.com/api tenetB.example.com/api From…
Marty Neal
  • 8,741
  • 3
  • 33
  • 38
1
vote
0 answers

Sending Image with Micronaut Declarative Http client MediaType.MULTIPART_FORM_DATA not working

I am using Micronaut declarative client to communicate among other microservice as below @Client(id="feteBirdProduct", path = "/product") public interface IProductClient extends IProductOperation { } Controller method @Controller("/product") public…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

how convert io.micronaut.http.HttpRequest to CompletableFuture

I am following 4 Low Level Client and I want adjust the example to return a CompletableFuture. My final goal is consume two different endpoints in parallel. I am very new in Micronaut. I believe one good approach would be created two Micronaut Low…
Jim C
  • 3,957
  • 25
  • 85
  • 162
1
vote
0 answers

Java Micronaut - throws "javax.net.ssl.SSLHandshakeException" after I hit the endpoint more than once

I have a simple micronaut app. I have two separate endpoints where the method that executes will call an API using a client (I've tried both the http client from "java.net.http.HttpClient" and "io.micronaut.http.client.RxHttpClient" but the same…
jpz
  • 11
  • 1
1
vote
0 answers

Route parameter in Micronaut declarative http client

I have an API gateway using the declarative Http client and trying to pass the route parameter to the other microservice application as below @Client(id="feteBirdProduct", path = "/sub-category") public interface ISubCategoryClient extends…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
0 answers

Micronaut testing with declarative HTTP client Junit 5

Trying to do the Junit 5 E2E functional testing using Micronaut declarative HTTP client. public interface IProductOperation { @Get(value = "/search/{text}") @Secured(SecurityRule.IS_ANONYMOUS) Maybe freeTextSearch(@NotBlank String…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

Custom Security Rules not working Micronaut 2.2.1

I am trying to implement the custom security rules with Micronaut 2.2.1, but it is not working. public @interface RequiredPermission { String resourceIdName(); String permission(); } Security Rules @Singleton public class AdminRequirement…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
0 answers

OAuth/OIDC in open api 3 with Micronaut swagger

I am trying to Authorize the API endpoint with identity OKTA from the Micronaut swagger definition. Below is the configuration for the OKTA micronaut: application: name: demo security: authentication: idtoken oauth2: clients: …
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
1
vote
1 answer

micronaut redirect httprequest to different service

In micronaut there are declarative clients: @Client("http://localhost:5000") public interface ServiceB { @Get("/ping") HttpResponse ping(HttpRequest httpRequest); } In my controller class I want to redirect the incoming request to…
greedsin
  • 1,252
  • 1
  • 24
  • 49
1
vote
0 answers

How to do digest authentication with micronaut http client?

i need to call an api that is using the digest authentication mechanism. How to do that with micronaut http client? i did authentication application with basic authentication easily with this simple HttpClientFiler: public Publisher
RJO
  • 1,000
  • 1
  • 8
  • 14
1
vote
1 answer

How can I retry HTTP client requests within a HttpClientFilter using Micronaut?

I've implemented a micronaut HttpClientFilter to add a cached bearer token for all requests to a 3rd party service, however this token expires fairly regularly. I would like to reauthenticate with the downstream API and retry the request when this…
Micheal Hill
  • 1,619
  • 2
  • 17
  • 38
1
vote
1 answer

Client posting multipart form data

I'm trying to create a client which I use to test my controller The controller @Secured(SecurityRule.IS_AUTHENTICATED) @Controller class InjuryController(private val userService: UserService, private val injuryService: InjuryService) { ... …
user672009
  • 4,379
  • 8
  • 44
  • 77
1
vote
0 answers

Parameter encoding with Micronaut HTTP client inside Grails 4

In a Grails 4.0.1 app I'm using the Micronaut HTTP client to call an external web service. Parameters are automatically url encoded into UTF-8. How can I force the encoding to be Windows-1252 instead?
Xavier Ger
  • 11
  • 3
1
vote
1 answer

Cannot create the generated HTTP client's required return type, since no TypeConverter from ByteBuffer to class java.io.File : Micronaut

Below is the server side code for sending file to client as rest response using micronaut. @Get(value = "/downloadFile", produces = MediaType.APPLICATION_OCTET_STREAM ) public HttpResponse downloadDocument() throws IOException { File…
Prerna shah
  • 321
  • 3
  • 20
1
vote
0 answers

Property Placeholders in Micronaut for file mounts

I am trying to provide secrets as property placeholders. For instance with mongobd uri, I want the username and password coming from secrets on a volume. Is this possible? For instance with the below kubernetes config, the placeholder I could…
zooes
  • 1,280
  • 3
  • 15
  • 21