org.simpleframework.http.Request.getContent()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(204)

本文整理了Java中org.simpleframework.http.Request.getContent方法的一些代码示例,展示了Request.getContent的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getContent方法的具体详情如下:
包路径:org.simpleframework.http.Request
类名称:Request
方法名:getContent

Request.getContent介绍

[英]This is used to get the content body. This will essentially get the content from the body and present it as a single string. The encoding of the string is determined from the content type charset value. If the charset is not supported this will throw an exception. Typically only text values should be extracted using this method if there is a need to parse that content.
[中]这用于获取内容正文。这将从正文中获取内容,并将其作为单个字符串呈现。字符串的编码由内容类型字符集值决定。如果不支持该字符集,则会引发异常。通常,如果需要解析文本值,则只应使用此方法提取文本值。

代码示例

代码示例来源:origin: mpetazzoni/ttorrent

getRequestHandler(response));
} else {
 myMultiAnnounceRequestProcessor.process(request.getContent(), request.getAddress().toString(),
     request.getClientAddress().getAddress().getHostAddress(), getRequestHandler(response));

代码示例来源:origin: CodeStory/fluent-http

@Override
public String content() throws IOException {
 return request.getContent();
}

代码示例来源:origin: ngallagher/simpleframework

/**
* This method attempts to acquire the content of the  request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
* 
* @return the content of the body, or null on error
*/
private String getContent() {
 try {
   return request.getContent();
 } catch(Exception e) {
   return null;
 }
}

代码示例来源:origin: org.simpleframework/simple

/**
* This method attempts to acquire the content of the  request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
* 
* @return the content of the body, or null on error
*/
private String getContent() {
 try {
   return request.getContent();
 } catch(Exception e) {
   return null;
 }
}

代码示例来源:origin: org.simpleframework/simple

/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
* 
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/    
public String getContent() throws IOException {
 return request.getContent();
}

代码示例来源:origin: org.simpleframework/simple-http

/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
* 
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/    
public String getContent() throws IOException {
 return request.getContent();
}

代码示例来源:origin: ngallagher/simpleframework

/**
* This is used to get the content body. This will essentially get
* the content from the body and present it as a single string.
* The encoding of the string is determined from the content type
* charset value. If the charset is not supported this will throw
* an exception. Typically only text values should be extracted
* using this method if there is a need to parse that content.
* 
* @exception IOException signifies that there is an I/O problem
*
* @return the body content as an encoded string value
*/    
public String getContent() throws IOException {
 return request.getContent();
}

代码示例来源:origin: org.simpleframework/simple-http

/**
* This method attempts to acquire the content of the  request
* body. If there is an <code>IOException</code> acquiring the
* content of the body then this will simply return a null
* value without reporting the exception.
* 
* @return the content of the body, or null on error
*/
private String getContent() {
 try {
   return request.getContent();
 } catch(Exception e) {
   return null;
 }
}

代码示例来源:origin: org.kie.remote/kie-remote-client

out.print(wsdlContent);
} else if( address.endsWith(DEFAULT_REAL_ENDPOINT) ) {
  JaxbCommandsRequest cmdRequest = deserializeAndUnwrapRequest(req.getContent());

相关文章