Example usage for java.net URLDecoder decode

List of usage examples for java.net URLDecoder decode

Introduction

In this page you can find the example usage for java.net URLDecoder decode.

Prototype

@Deprecated
public static String decode(String s) 

Source Link

Document

Decodes a x-www-form-urlencoded string.

Usage

From source file:com.rajaram.bookmark.controller.BookmarkController.java

@RequestMapping(value = "{userName}", method = RequestMethod.GET)
@ApiOperation(httpMethod = "GET", value = "Get bookmarks from the database" + " for a given user name."

        , produces = ("application/json,application/xml"))
public @ResponseBody BookmarkList getBookmarks(
        @ApiParam(name = "userName", value = "user name", required = true) @RequestParam String userName) {
    userName = URLDecoder.decode(userName);
    List<Bookmark> bookmarks = bookmarkService.getBookmarks(userName);

    BookmarkList bookmarkList = new BookmarkList(bookmarks);

    return bookmarkList;
}