Set the value of the protocol property with a string. This method will attempt to resolve the provided value to either 'http' or 'https', or null if a reasonable guess results in anything else. @param rawProtocol The protocol, eg http
(String rawProtocol)
| 286 | * @param rawProtocol The protocol, eg http |
| 287 | */ |
| 288 | public void setProtocol(String rawProtocol) { |
| 289 | |
| 290 | |
| 291 | if (rawProtocol == null || rawProtocol.length() < 1) { |
| 292 | protocol = null; |
| 293 | } else if (rawProtocol.toLowerCase().contains("https")) { |
| 294 | protocol = "https"; |
| 295 | } else if (rawProtocol.toLowerCase().contains("http")) { |
| 296 | protocol = "http"; |
| 297 | } else { |
| 298 | protocol = null; |
| 299 | } |
| 300 | |
| 301 | } |
| 302 | |
| 303 | |
| 304 | /** |