Package org.kurron.foundation.rest

Examples of org.kurron.foundation.rest.HttpHeadersBuilder


{
    @Test
    public void given_a_valid_request_when__echo_time_is_called_then_current_time_is_returned_as_json() throws Exception
    {
        final RestTemplate template = new RestTemplate();
        final HttpHeaders headers = new HttpHeadersBuilder().acceptJSON().acceptUTF8().build();
        final HttpEntity<String> entity = new HttpEntity<String>( headers );

        try
        {
            final ResponseEntity<String> response = template.exchange( "http://localhost:8080/echo/time", HttpMethod.GET, entity, String.class );
View Full Code Here


    @Test
    public void test_get_person() throws Exception
    {
        final RestTemplate template = new RestTemplate();
        final HttpHeaders headers = new HttpHeadersBuilder().acceptJSON().acceptUTF8().build();
        final HttpEntity<String> entity = new HttpEntity<String>( headers );

        try
        {
            final ResponseEntity<Object> response = template.exchange( "http://localhost:8080/echo/person", HttpMethod.GET, entity, Object.class );
View Full Code Here

TOP

Related Classes of org.kurron.foundation.rest.HttpHeadersBuilder

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.