org.restlet.Request.getEntityAsText()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(109)

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

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 )

相关文章