Here you can find the source of decodeRequestBody(String requestBody)
Parameter | Description |
---|---|
requestBody | a parameter |
Parameter | Description |
---|---|
UnsupportedEncodingException | an exception |
public static String decodeRequestBody(String requestBody) throws UnsupportedEncodingException
//package com.java2s; //License from project: LGPL import java.io.UnsupportedEncodingException; import java.net.URLDecoder; public class Main { /**/*from w ww.jav a 2 s .co m*/ * Decode given request body as UTF-8 string. * * @param requestBody * @return * @throws UnsupportedEncodingException */ public static String decodeRequestBody(String requestBody) throws UnsupportedEncodingException { return URLDecoder.decode(requestBody, "UTF-8"); } }