You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To better fit in with the Dropwizard "Resources" design methodology, the UrlShortenerResource class should be returning a "ShortenedUrl" object instead of a Response object.
The text was updated successfully, but these errors were encountered:
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.
To better fit in with the Dropwizard "Resources" design methodology, the UrlShortenerResource class should be returning a "ShortenedUrl" object instead of a Response object.
The text was updated successfully, but these errors were encountered: