Added some additional fields
This commit is contained in:
parent
75311f5d74
commit
fee8180690
2 changed files with 9 additions and 1 deletions
|
|
@ -39,10 +39,11 @@ public class HttpHeader {
|
|||
public static final String HEADER_COOKIE = "Cookie";
|
||||
public static final String HEADER_CONTENT_TYPE = "Content-Type";
|
||||
public static final String HEADER_CONTENT_LENGTH = "Content-Length";
|
||||
public static final String HEADER_IF_NONE_MATCH = "If-None-Match";
|
||||
public static final String HEADER_LOCATION = "Location";
|
||||
public static final String HEADER_SET_COOKIE = "Set-Cookie";
|
||||
public static final String HEADER_SERVER = "Server";
|
||||
public static final String HEADER_USER_AGENT = "User-Agent";
|
||||
public static final String HEADER_IF_NONE_MATCH = "If-None-Match";
|
||||
|
||||
// Variables
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@
|
|||
|
||||
package zutil.net.http;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
|
|
@ -50,6 +53,10 @@ public class HttpURL {
|
|||
|
||||
public HttpURL() {}
|
||||
|
||||
public HttpURL(String urlStr) throws MalformedURLException {
|
||||
this(new URL(urlStr));
|
||||
}
|
||||
|
||||
public HttpURL(URL url) {
|
||||
this.setProtocol(url.getProtocol());
|
||||
this.setHost(url.getHost());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue