Hello! Have you seen the documentation for the dropwizard-client module? If you're having trouble setting up a usable HTTP client, there's some sample code there to get you started:
https://www.dropwizard.io/1.3.5/docs/manual/client.html Either client should give you what you need to make a request to your 3rd-party API -- Execute an HTTP method for a given URI, add an Authorization header, possibly with some request params/request body. The documentation assumes you know (or can find) how to use the Apache Http Client or Jersey Client once given an instance, though, so you might want to look at the docs for those libraries if you haven't used them before. Does that help? On Tuesday, October 16, 2018 at 12:04:55 PM UTC-7, [email protected] wrote: > > Hey folks, > > I'm new to DropWizard (1.3.7) and I am having trouble figuring out how to > implement a solution I want. > > I am creating a microservice to act as the middle man between a > third-party service (like GitHub, ie: API cannot be changed) and my webapp > client. > > When the client makes a call like GET /users/, once my service receives > the GET call will need to make a REST call to the third-party service (like > GitHub). > > > I haven't been able to figure out how to make a REST call from the backend > to the third-party service. The REST call requires including a > Authorization header before submitting to the third-party. > > > I have looked at HttpClient and I looked at the Dropwizard Configuration > Reference, but I am just not sure where to start. > > Do I look at Jersey (or some other library bundled with Dropwizard) and > how they do it or does DropWizard have a support for this built in? > -- You received this message because you are subscribed to the Google Groups "dropwizard-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
