Package groovyx.net.http

Examples of groovyx.net.http.HttpResponseDecorator


        try {
            Map<String, String> props = new HashMap<>();
            props.put(SERVICENAME, resource.getResourceName());
            props.put(NAME, resource.getResourceName());
            AzureClient azureClient = aDCO.getNewAzureClient(credential);
            HttpResponseDecorator deleteVirtualMachineResult = (HttpResponseDecorator) azureClient.deleteVirtualMachine(props);
            String requestId = (String) azureClient.getRequestId(deleteVirtualMachineResult);
            waitUntilComplete(azureClient, requestId);
        } catch (HttpResponseException ex) {
            httpResponseExceptionHandler(ex, resource.getResourceName(), stack.getOwner(), stack);
        } catch (Exception ex) {
View Full Code Here


        return photos;
    }
   
    private void fetchPhotos(final String tag, List<Photo> photos) throws ClientProtocolException, IOException, URISyntaxException {
        HttpResponseDecorator response = (HttpResponseDecorator) rest().get(asMap(
                new Object[]{"path", "rest"},
                new Object[]{"query", asMap(
                        new Object[]{"api_key", getConfigValueAsString(FLICKR_API_KEY)},
                        new Object[]{"method", "flickr.photos.search"},
                        new Object[]{"tags", tag}
                )}
        ));
        NodeChild root = (NodeChild)response.getData();
        NodeChild photosNode = (NodeChild)root.children().getAt(0);
       
        int i = 0;
        for (Iterator<Node> children = photosNode.childNodes(); i < 3 && children.hasNext(); i++) {
            Node photo = children.next();
View Full Code Here

TOP

Related Classes of groovyx.net.http.HttpResponseDecorator

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.