
com.aliyun.credentials.http.HttpRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of credentials-java Show documentation
Show all versions of credentials-java Show documentation
Alibaba Cloud Credentials for Java
Copyright (C) Alibaba Cloud Computing
All rights reserved.
版权所有 (C)阿里云计算有限公司
https://www.aliyun.com
package com.aliyun.credentials.http;
import com.aliyun.credentials.utils.ParameterHelper;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
public class HttpRequest extends HttpMessage {
private Map immutableMap = new HashMap();
public HttpRequest() {
setCommonParameter();
}
public HttpRequest(String url) {
super(url);
setCommonParameter();
}
private void setCommonParameter() {
this.immutableMap.put("Timestamp", ParameterHelper.getISO8601Time(new Date()));
this.immutableMap.put("SignatureNonce", ParameterHelper.getUniqueNonce());
this.immutableMap.put("SignatureMethod", "HMAC-SHA1");
this.immutableMap.put("SignatureVersion", "1.0");
}
public void setUrlParameter(String key, String value) {
this.immutableMap.put(key, value);
}
public String getUrlParameter(String key) {
return this.immutableMap.get(key);
}
public Map getUrlParameters() {
return Collections.unmodifiableMap(immutableMap);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy