1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
| package cn.emay.sdk.util.http.request.impl;
|
| import java.io.UnsupportedEncodingException;
| import java.util.Map;
|
| import cn.emay.sdk.util.http.request.EmayHttpRequest;
|
|
| /**
| * 传输数据为byte[]的请求实体
| *
| * @author Frank
| *
| */
| public class EmayHttpRequestBytes extends EmayHttpRequest<byte[]>{
|
| public EmayHttpRequestBytes(String url, String charSet, String method, Map<String, String> headers, String cookies, byte[] params) {
| super(url, charSet, method, headers, cookies, params);
| }
|
| @Override
| public byte[] paramsToBytesForPost() {
| return this.getParams();
| }
|
| @Override
| public String paramsToStringForGet() {
| try {
| return new String(this.getParams(),this.getCharSet());
| } catch (UnsupportedEncodingException e) {
| e.printStackTrace();
| }
| return null;
| }
|
|
| }
|
|