Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UrlShortenerResource should return POJOs instead of Response objects #9

Closed
mpeng3 opened this issue Jul 8, 2016 · 1 comment
Closed
Assignees

Comments

@mpeng3
Copy link
Owner

mpeng3 commented Jul 8, 2016

To better fit in with the Dropwizard "Resources" design methodology, the UrlShortenerResource class should be returning a "ShortenedUrl" object instead of a Response object.

@mpeng3 mpeng3 self-assigned this Jul 8, 2016
mpeng3 added a commit that referenced this issue Jul 25, 2016
This may require more work before completion to see if there is any way
to return a POJO from the expandUrl function as well.
mpeng3 added a commit that referenced this issue Jul 25, 2016
Created a "expandUrl" helper function.  This is called by the
"getExpandedUrl" and "redirectUrl" functions (which have the same
endpoint, but different media types).  This allows the shortener to be
accessed via either a web browser (for automatic redirection) or an API
client.  The "redirectUrl" function still returns a Response object, but
I felt this was cleaner than returning void but passing it an
"HttpWebResponse" object and calling the redirect on this object.
StdVectorBool added a commit that referenced this issue Aug 3, 2016
Issue #9 - Converted endpoints to return POJOs
@mpeng3
Copy link
Owner Author

mpeng3 commented Aug 3, 2016

Issue resolved by merge from branch.

@mpeng3 mpeng3 closed this as completed Aug 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant