Package com.elevenware.ladybird.entities

Examples of com.elevenware.ladybird.entities.ContentHandler


    }

    @Override
    public <T> T getEntity(Class<T> clazz) {
        ContentType contentType = ContentType.parse(response.getEntity().getContentType().getValue());
        ContentHandler handler = ContentHandlers.getInstance().forType(contentType,originalAccept);
        return handler.unmarshal(payload, clazz);
    }
View Full Code Here


        setPath(path);
        return client.doPost(this, body);
    }

    public HttpResponse post(String path, Object payload) {
        ContentHandler handler = ContentHandlers.getInstance().forType(getContentType(), null);
        String entity = handler.marshal(payload);
        return post(path, entity);
    }
View Full Code Here

        setPath(path);
        return client.doPut(this, body);
    }

    public HttpResponse put(String path, Object payload) {
        ContentHandler handler = ContentHandlers.getInstance().forType(getContentType(), null);
        String entity = handler.marshal(payload);
        return put(path, entity);
    }
View Full Code Here

TOP

Related Classes of com.elevenware.ladybird.entities.ContentHandler

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.