> +      HttpURLConnection connection = (HttpURLConnection) 
> url.openConnection();           
> +      connection.setDoOutput(true);
> +      connection.setDoInput(true);
> +      connection.setInstanceFollowRedirects(false);
> +      connection.setRequestMethod("POST");
> +      connection.setUseCaches(false);
> +      connection.connect();
> +      int code = connection.getResponseCode();
> +      connection.disconnect();
> +      
> +      return code == 202;
> +   }
> +   
> +   public static boolean execute(WebhookResponse webhook) throws IOException 
> {
> +      return execute(webhook.getAnonymousExecutionURI());
> +   }

Executing a webhook anonymously should not require context, authentication, or 
even jclouds. The utils method is mostly for testing/example.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/48/files#r7535573

Reply via email to