From the course: Building RESTful Web Services with DropWizard

Unlock this course with a free trial

Join today to access over 22,700 courses taught by industry experts.

Add GET endpoint

Add GET endpoint

- [Instructor] In this video, we'll revisit the get endpoint that we've actually done and make sure that we have all the stuff that we need in order for it to function on. So let's go ahead and go back to test resources in the resources folder and what I'm going to do is move this guy above the post and just below the get here because we had already written our get endpoint here. The only thing that we're going to add to timed, we're actually going to add some functions here. So let's go ahead and add a name equals to a get slash requests timed and then also add metered with the same things. Name equals get requests, and this time metered. And finally, we're going to also construct into this function cache control. So let's do cache control and we're going to construct with max age equals to one and max age unit equals to timeunit.days. So again, as we've done, when we actually wrote that function,…

Contents