public abstract class ERXHttpDataObjectBase extends Object
ERXML.Doc doc = ERXML.doc(...); // Create the Post XML Doc
ERXHttpPostData httpData = new ERXHttpPostData(<<hostname>>);
httpData.setScheme(ERXHttpPostData.SCHEME_HTTP);
httpData.setPath(<<Path>>);
httpData.setContentType("text/xml");
httpData.setSendEntity(doc.toString());
try {
httpData.execute();
if (httpData.html().startsWith("<?xml")) {
ERXML.Doc parseDoc = ERXML.doc(httpData.html());
...
Modifier and Type | Field and Description |
---|---|
static String |
ENCODING_SJIS |
static String |
ENCODING_UTF8 |
static org.apache.http.HttpVersion |
HTTP_1_0 |
static org.apache.http.HttpVersion |
HTTP_1_1 |
static int |
HTTP_GET |
static int |
HTTP_PORT |
static int |
HTTP_POST |
static int |
HTTPS_PORT |
static String |
SCHEME_HTTP |
static String |
SCHEME_HTTPS |
Constructor and Description |
---|
ERXHttpDataObjectBase(String hostname) |
Modifier and Type | Method and Description |
---|---|
void |
addQueryParams(String key,
String value)
Adding Query Parameters
|
protected String |
contentType() |
protected org.apache.http.conn.scheme.Scheme |
createScheme() |
org.apache.http.HttpEntity |
entity() |
abstract void |
execute() |
protected String |
hostname() |
String |
html() |
org.apache.http.HttpVersion |
httpVersion() |
protected boolean |
isHttpGet() |
protected boolean |
isHttpPost() |
protected String |
path() |
protected int |
port() |
protected List<org.apache.http.NameValuePair> |
queryParams() |
protected String |
receiveEncoding() |
org.apache.http.HttpResponse |
response() |
protected String |
scheme() |
protected String |
sendEncoding() |
protected String |
sendEntity() |
void |
setContentType(String contentType) |
protected void |
setEntity(org.apache.http.HttpEntity entity) |
protected void |
setHostname(String hostname) |
protected void |
setHtml(String html) |
protected void |
setHttpGet() |
protected void |
setHttpPost() |
void |
setHttpVersion(org.apache.http.HttpVersion httpVersion)
HTTP Version
HTTP バージョン
|
void |
setPath(String path) |
void |
setPort(int port) |
void |
setReceiveEncoding(String receiveEncoding)
Receive Encoding
受信エンコーディング
|
protected void |
setResponse(org.apache.http.HttpResponse response) |
void |
setScheme(String scheme) |
void |
setSendEncoding(String sendEncoding)
Send Encoding
送信エンコーディング
|
void |
setSendEntity(String sendEntity) |
protected void |
setURI(URI uri)
absolute URI for check
URI がどの様に作成されている為に確認できるように
|
URI |
uri() |
protected String |
userAgent() |
public static int HTTP_GET
public static int HTTP_POST
public static int HTTP_PORT
public static int HTTPS_PORT
public static String SCHEME_HTTP
public static String SCHEME_HTTPS
public static String ENCODING_UTF8
public static String ENCODING_SJIS
public static org.apache.http.HttpVersion HTTP_1_0
public static org.apache.http.HttpVersion HTTP_1_1
public ERXHttpDataObjectBase(String hostname)
protected void setHttpPost()
protected boolean isHttpPost()
protected void setHttpGet()
protected boolean isHttpGet()
protected void setHostname(String hostname)
protected String hostname()
public void setPort(int port)
protected int port()
public void setScheme(String scheme)
protected String scheme()
public void setPath(String path)
protected String path()
public void setSendEncoding(String sendEncoding)
protected String sendEncoding()
public void setReceiveEncoding(String receiveEncoding)
protected String receiveEncoding()
protected void setResponse(org.apache.http.HttpResponse response)
public org.apache.http.HttpResponse response()
protected void setEntity(org.apache.http.HttpEntity entity)
public org.apache.http.HttpEntity entity()
protected void setHtml(String html)
public String html()
public void setSendEntity(String sendEntity)
protected String sendEntity()
public void setContentType(String contentType)
protected String contentType()
protected void setURI(URI uri)
public URI uri()
public void setHttpVersion(org.apache.http.HttpVersion httpVersion)
public org.apache.http.HttpVersion httpVersion()
public void addQueryParams(String key, String value)
key
- - Keyvalue
- - Value
検索配列key
- - キーvalue
- - 値
protected List<org.apache.http.NameValuePair> queryParams()
protected org.apache.http.conn.scheme.Scheme createScheme()
protected String userAgent()
Copyright © 2002 – 2024 Project Wonder.