本文整理了Java中org.restlet.Request.getEntityAsText
方法的一些代码示例,展示了Request.getEntityAsText
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getEntityAsText
方法的具体详情如下:
包路径:org.restlet.Request
类名称:Request
方法名:getEntityAsText
暂无
代码示例来源:origin: apache/attic-polygene-java
private <K> K convertToObject( Class<K> type, Request request )
{
try
{
return converter.toObject( request.getEntity(), type, null );
}
catch( IOException e )
{
throw new ConversionException( request.getEntityAsText() );
}
}
代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.rest-server
private boolean shouldShowCommandForm( Method interactionMethod )
{
// Show form on GET/HEAD
if( Request.getCurrent().getMethod().isSafe() )
{
return true;
}
if( interactionMethod.getParameterTypes().length > 0 )
{
return !( interactionMethod.getParameterTypes()[ 0 ].equals( Response.class ) || Request.getCurrent()
.getEntity()
.isAvailable() || Request.getCurrent().getEntityAsText() != null || Request.getCurrent()
.getResourceRef()
.getQuery() != null );
}
return false;
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.rest-server
private boolean shouldShowCommandForm( Method interactionMethod )
{
// Show form on GET/HEAD
if( Request.getCurrent().getMethod().isSafe() )
{
return true;
}
if( interactionMethod.getParameterTypes().length > 0 )
{
return !( interactionMethod.getParameterTypes()[ 0 ].equals( Response.class ) || Request.getCurrent()
.getEntity()
.isAvailable() || Request.getCurrent().getEntityAsText() != null || Request.getCurrent()
.getResourceRef()
.getQuery() != null );
}
return false;
}
代码示例来源:origin: apache/attic-polygene-java
private boolean shouldShowCommandForm( Method interactionMethod )
{
// Show form on GET/HEAD
if( Request.getCurrent().getMethod().isSafe() )
{
return true;
}
if( interactionMethod.getParameterTypes().length > 0 )
{
return !( interactionMethod.getParameterTypes()[ 0 ].equals( Response.class ) || Request.getCurrent()
.getEntity()
.isAvailable() || Request.getCurrent().getEntityAsText() != null || Request.getCurrent()
.getResourceRef()
.getQuery() != null );
}
return false;
}
代码示例来源:origin: org.qi4j.library/org.qi4j.library.rest-server
String json = Request.getCurrent().getEntityAsText();
if( json == null )
String text = Request.getCurrent().getEntityAsText();
if( text == null )
代码示例来源:origin: apache/attic-polygene-java
String json = Request.getCurrent().getEntityAsText();
if( json == null )
String text = Request.getCurrent().getEntityAsText();
if( text == null )
代码示例来源:origin: org.apache.polygene.libraries/org.apache.polygene.library.rest-server
String json = Request.getCurrent().getEntityAsText();
if( json == null )
String text = Request.getCurrent().getEntityAsText();
if( text == null )
内容来源于网络,如有侵权,请联系作者删除!