Package org.ontoware.jrest.response

Examples of org.ontoware.jrest.response.RestResponse


  }

  public RestResponse get(@RestAddressByParameter("one")
  int a, @RestAddressByParameter("two")
  int b) {
    return new RestResponse("<html><h2>" + (a + b)+"</h2>", RestParams.MIME_TEXT_HTML, 200,
        null, null);
  }
View Full Code Here


    // setting MIME-type to text/HTML:
    String mimetype = RestParams.MIME_TEXT_HTML;
    // setting responsecode to 200 (HTTP OK):
    int responsecode = 200;
    // ( ',null,null' here means we don't use xslt or css here)
    RestResponse response = new RestResponse(responseString, mimetype, responsecode, null, null);
    return response;
  }
View Full Code Here

    //response.getParameter()
    //response.getResponseBody()
    //response.toWriter(writer)
    //response.toStream(stream)
   
    return new RestResponse(String.valueOf(a*b), RestParams.MIME_TEXT_PLAIN, 200, null, null);
  }
View Full Code Here

TOP

Related Classes of org.ontoware.jrest.response.RestResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.