@@ -0,0 +1,1916 @@
+/**%0A * Copyright (c) 2013 the original author or authors%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.qiweb.runtime.http;%0A%0Aimport org.junit.Test;%0Aimport org.qiweb.api.controllers.Outcome;%0Aimport org.qiweb.runtime.routes.RoutesParserProvider;%0Aimport org.qiweb.runtime.routes.RoutesProvider;%0Aimport org.qiweb.test.QiWebTest;%0A%0Aimport static com.jayway.restassured.RestAssured.given;%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.qiweb.api.controllers.Controller.outcomes;%0Aimport static org.qiweb.api.controllers.Controller.request;%0Aimport static org.qiweb.api.mime.MimeTypes.TEXT_PLAIN;%0A%0Apublic class HttpRequestBodyTest%0A    extends QiWebTest%0A%7B%0A%0A    public static class Controller%0A    %7B%0A%0A        public Outcome echo()%0A        %7B%0A            return outcomes().%0A                ok( request().body().asString() ).%0A                as( TEXT_PLAIN ).%0A                build();%0A        %7D%0A    %7D%0A%0A    @Override%0A    protected RoutesProvider routesProvider()%0A    %7B%0A        return new RoutesParserProvider( %22POST /echo org.qiweb.runtime.http.HttpRequestBodyTest$Controller.echo%22 );%0A    %7D%0A%0A    @Test%0A    public void testBodyAsString()%0A    %7B%0A        given().%0A            contentType( TEXT_PLAIN ).%0A            body( %22FooBarBazar%22 ).%0A            expect().%0A            statusCode( 200 ).%0A            body( equalTo( %22FooBarBazar%22 ) ).%0A            when().%0A            post( %22/echo%22 );%0A    %7D%0A%7D%0A

add minimal HttpRequestBodyTest