vertx-service-proxy and custom headers

82 views
Skip to first unread message

Mihai Cazacu

unread,
Jun 26, 2016, 3:21:19 PM6/26/16
to vert.x
Hi,

Is there a way to send some custom headers when using vertx-service-proxy?

```
EventBusService.getProxy(discovery, SomeService) { AsyncResult<SomeService> ar1 ->
SomeService someService = ar1.result()
someService.someMethod(someCommand) { AsyncResult<SomeResult> ar2 ->
// do something
}
}
```

For each call, I want to send an "Authorization" header and I really don't want to include it in the "someCommand" class.

Thanks!

Julien Viet

unread,
Jun 26, 2016, 3:23:57 PM6/26/16
to ve...@googlegroups.com
Hi,

you can create the proxy instance with a DeliveryOptions instance that contains that contains header.

these delivery options are sent with each message to the service.

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/75660761-71f6-48a8-93ff-004f464dbaae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mihai Cazacu

unread,
Jun 26, 2016, 4:00:05 PM6/26/16
to vert.x
Is there a method in `EventBusService` that accepts also a `DeliveryOptions` parameter? I don't see it (vertx version: 3.3.0).

Clement Escoffier

unread,
Jun 26, 2016, 6:18:55 PM6/26/16
to ve...@googlegroups.com
Hi,

Nope, it’s not possible yet using the EventBusService helper class. Can you open an issue so we don’t forget to add it in the next version.

Clement

On 26 juin 2016, at 13:00, Mihai Cazacu <cazacu...@gmail.com> wrote:

Is there a method in `EventBusService` that accepts also a `DeliveryOptions` parameter? I don't see it (vertx version: 3.3.0).

--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.

Mihai Cazacu

unread,
Jun 27, 2016, 4:24:39 AM6/27/16
to vert.x
Reply all
Reply to author
Forward
0 new messages