Java URL Decode decodeRequestBody(String requestBody)

Here you can find the source of decodeRequestBody(String requestBody)

Description

Decode given request body as UTF-8 string.

License

LGPL

Parameter

Parameter Description
requestBody a parameter

Exception

Parameter Description
UnsupportedEncodingException an exception

Declaration

public static String decodeRequestBody(String requestBody) throws UnsupportedEncodingException 

Method Source Code


//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");
    }
}

Related

  1. decodeName(final String name)
  2. decodeName(String createdName)
  3. DecodePath(String path)
  4. decodePercent(String s)
  5. decodePercent(String str)
  6. decodeRequestString2(String inputString)
  7. decodeRfc5849(final String value)
  8. decodeSpecialMdxCharactersInNames(String name)
  9. decodeStr(String str)