Package org.apache.isis.viewer.json.applib

Examples of org.apache.isis.viewer.json.applib.RestfulRequest.withHeader()


    @Test
    public void correctMediaType() throws Exception {

        // given
        final RestfulRequest restfulReq = client.createRequest(HttpMethod.GET, "/");
        restfulReq.withHeader(Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);

        // when
        final RestfulResponse<HomePageRepresentation> restfulResp = restfulReq.executeT();

        // then
View Full Code Here


    public void runtimeException_isMapped() throws Exception {

        // given
        final RestfulRequest restfulReq = client.createRequest(HttpMethod.GET, "version");
        final Header<Boolean> header = new Header<Boolean>("X-FAIL", Parser.forBoolean());
        restfulReq.withHeader(header, true);

        // when
        final RestfulResponse<JsonRepresentation> jsonResp = restfulReq.execute();

        // then
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.