jclouds-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunny Gleason <notificati...@github.com>
Subject Re: [jclouds] Jclouds 136 -- Implementation of DynECT HTTP Redirect service API (#37)
Date Sat, 29 Jun 2013 16:53:42 GMT
> +
> +/**
> + * Encapsulates data related to DynECT HTTP redirect service.
> + */
> +public class HttpRedirect extends ForwardingMap<String, Object> {
> +   private final String url;
> +   private final int code;
> +   private final String keepUri;
> +   private final String fqdn;
> +   private final String zone;
> +
> +   @ConstructorProperties({ "url", "code", "keep_uri", "fqdn", "zone" })
> +   private HttpRedirect(String url, int code, String keepUri, String fqdn, String zone)
{
> +      this.url = checkNotNull(url, "url");
> +      checkArgument(code == 301 || code == 302, "code of %s must be 301 or 302", code);
> +      checkArgument("Y".equals(keepUri) || "N".equals(keepUri), "code of %s must be
'Y' or 'N'", keepUri);

We should send upper case to the API, but I'll robustify the input checking here

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/37/files#r4952479

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message