Gets the string body for the request.

@return the string body associated with this request.
@throws UnsupportedEncodingException thrown if there was a problem with the encoding of the body.
321867
public String getStringBody() throws UnsupportedEncodingException {
        if (mStringBody != null)
            return mStringBody;

        if (mContentType != null) {
            switch (mContentType) {
                case JSON:
                    JsonObject jsonBody = new JsonObject();
                    for (Map.Entry<String, Object> entry : mBodyMap.entrySet()) {
                        parseHashMapEntry(jsonBody, entry);
                    }
                    mStringBody = jsonBody.toString();
                    break;
                case URL_ENCODED:
                    HashMap<String, String> stringMap = new HashMap<String, String>();
                    for (Map.Entry<String, Object> entry : mBodyMap.entrySet()) {
                        stringMap.put(entry.getKey(), (String) entry.getValue());
                    }
                    mStringBody = createQuery(stringMap);
                    break;
                case JSON_PATCH:
                    mStringBody = ((BoxArray) mBodyMap.get(JSON_OBJECT)).toJson();
                    break;
            }
        }

        return mStringBody;
    }
282265
public String getString(String encoding) throws InvalidBEncodingException {
    try {
      return new String(this.getBytes(), encoding);
    } catch (ClassCastException cce) {
      throw new InvalidBEncodingException(cce.toString());
    } catch (UnsupportedEncodingException uee) {
      throw new InternalError(uee.toString());
    }
  }
526365
@Override
    public String getCharacterEncoding() {
        try {
            collaborator.preInvoke(componentMetaData);
            return request.getCharacterEncoding();
        } finally {
            collaborator.postInvoke();
        }
    }
531710
public String getString() 
    {
        String string = super.getString();
        if ((string != null) && (string.length() > 0))
            string = this.decodeString(string);
        return string;
    }
882868
public String getDataString() {
        if (exception == null) {
            try {
                if (!setDataString) {
                    dataString = EntityUtils.toString(httpEntity, charset.charset);
                    setDataString = true;
                }
            } catch (IOException e) {
                e.printStackTrace();
                return null;
            }
        }

        return dataString;
    }
769096
public function getParsedBody()
    {
        if ($this->parsedBody !== false) {
            return $this->parsedBody;
        }

        $mediaType = $this->getMediaType();

        $parts = explode('+', $mediaType);
        if (count($parts) >= 2) {
            $mediaType = 'application/' . $parts[count($parts) - 1];
        }
        unset($parts);

        if (isset($this->bodyParsers[$mediaType])) {
            $body = (string) $this->getBody();
            $parsed = $this->bodyParsers[$mediaType]($body);

            $this->parsedBody = $parsed;

            unset($parsed, $body, $mediaType);

            return $this->parsedBody;
        }

        return null;
    }
196319
public String getString() {
        byte[] rawdata = get();
        String charset = getCharSet();
        if (charset == null) {
            charset = DEFAULT_CHARSET;
        }
        try {
            return new String(rawdata, charset);
        } catch (UnsupportedEncodingException e) {
            return new String(rawdata);
        }
    }
1373130
public String getString() 
    {
        String string = super.getString();
        if ((string != null) && (string.length() > 0))
        {
            StringBuffer sb = new StringBuffer(string);
            if (sb.length() > m_iUnmaskedChars)
            {
                String strFiller = "" + FILLER;
                for (int i = 0; i < sb.length() - m_iUnmaskedChars; i++)
                {
                    sb.replace(i, i+1, strFiller);
                }
                string = sb.toString();
            }
        }
        return string;
    }
710565
public String getBody() {
        JsonNode body=getBodyJson();
        if(body!=null) {
            return body.toString();
        } else {
            return null;
        }
    }
542478
@Deprecated
  public RequestTemplate body(String bodyText) {
    byte[] bodyData = bodyText != null ? bodyText.getBytes(UTF_8) : null;
    return body(bodyData, UTF_8);
  }
147447
public String readBodyAsString() {
        Charset charset = readCharset();
        byte[] bodyContent = message.getBodyContent();
        return new String(bodyContent, charset);
    }
121829
@JsonIgnore
    public String getDecodedContentAsString() {

        if (content == null) {
            return (null);
        }

        if ("base64".equalsIgnoreCase(encoding)) {
            return (new String(Base64.getDecoder().decode(content)));
        }

        return (content);
    }
690721
public String html() {
        if (html != null) {
            return html;
        }

        if (content == null) {
            return null;
        }
        if (charset == null) {
            charset = CharsetDetector.guessEncoding(content());
        }
        try {
            html = new String(content, charset);
        } catch (UnsupportedEncodingException e) {
            LOG.info("Exception when decoding "+ key(),e);
            return null;
        }
        return html;
    }
894682
public String getUrlEncodedQueryString(){
        StringBuilder sb = new StringBuilder();
        for (Entry<String, Object> parameter : parameters.entrySet()){
            if (sb.length() > 0){
                sb.append("&");
            }
            try {
                StringBuilder sb2 = new StringBuilder();
                sb2.append(parameter.getKey());
                sb2.append("=");
                sb2.append(URLEncoder.encode(parameter.getValue().toString(), "UTF-8"));
                sb.append(sb2);
            }
            catch (UnsupportedEncodingException e) {
                System.err.println(e.getMessage());
            }
        }
        for (Entry<String, List> customTrackingParameter : customTrackingParameters.entrySet()){
            for (Object o : customTrackingParameter.getValue()){
                if (sb.length() > 0){
                    sb.append("&");
                }
                try {
                    StringBuilder sb2 = new StringBuilder();
                    sb2.append(URLEncoder.encode(customTrackingParameter.getKey(), "UTF-8"));
                    sb2.append("=");
                    sb2.append(URLEncoder.encode(o.toString(), "UTF-8"));
                    sb.append(sb2);
                }
                catch (UnsupportedEncodingException e) {
                    System.err.println(e.getMessage());
                }
            }
        }
        
        return sb.toString();
    }
1236030
public String asString() {
        String s = fromStringOrReader();
        if (s != null) return s;
        ByteBuffer bb = getByteBuffer();
        if (bb != null) return stringFrom(bb);
        InputStream is = fromStreamOrUrl();
        if (is != null) {
            Reader r = readerFrom(is);
            return stringFrom(r);
        }
        throw resourceUnaccessible();
    }
1321677
def _get_body_string(self):
        
        clen = self.content_length
        if clen > self.MEMFILE_MAX:
            raise HTTPError(413, 'Request entity too large')
        if clen < 0: clen = self.MEMFILE_MAX + 1
        data = self.body.read(clen)
        if len(data) > self.MEMFILE_MAX:  # Fail fast
            raise HTTPError(413, 'Request entity too large')
        return data
56593
public String getString() 
    { // By default, get the data as-is
        String string = this.stripNonNumeric(super.getString());
        int dataLength = string.length();
        if (dataLength > 4)
            string = string.substring(0, 4) + "-" + string.substring(4);
        return string;
    }