com.iteaj.iot.client.http.impl.DefaultHttpClientProtocol Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of iot-client Show documentation
Show all versions of iot-client Show documentation
基于netty的tcp, http, udp等协议的客户端
The newest version!
package com.iteaj.iot.client.http.impl;
import com.iteaj.iot.client.http.HttpClientProtocol;
import okhttp3.RequestBody;
import java.util.Map;
public class DefaultHttpClientProtocol extends HttpClientProtocol {
protected DefaultHttpClientProtocol(DefaultHttpClientMessage requestMessage) {
super(requestMessage);
}
public static DefaultHttpClientProtocol get(String url) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.get(url));
}
public static DefaultHttpClientProtocol get(String url, Map query) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.get(url, query));
}
public static DefaultHttpClientProtocol post(String url) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.post(url));
}
public static DefaultHttpClientProtocol post(String url, Map query) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.post(url, query));
}
public static DefaultHttpClientProtocol post(String url, Map query, Map body) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.post(url, query, body));
}
public static DefaultHttpClientProtocol post(String url, Map query, RequestBody body) {
return new DefaultHttpClientProtocol(DefaultHttpClientMessage.post(url, query, body));
}
@Override
protected DefaultHttpClientMessage doBuildRequestMessage() {
return this.requestMessage();
}
@Override
protected DefaultHttpClientMessage doBuildResponseMessage(DefaultHttpClientMessage message) {
return message;
}
@Override
public T protocolType() {
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy