com.geccocrawler.gecco.request.HttpPostRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gecco Show documentation
Show all versions of gecco Show documentation
Easy to use lightweight web crawler
package com.geccocrawler.gecco.request;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
public class HttpPostRequest extends AbstractHttpRequest {
private static final long serialVersionUID = -4451221207994730839L;
private Map fields;
public HttpPostRequest() {
super();
fields = new HashMap();
}
public HttpPostRequest(String url) {
super(url);
fields = new HashMap();
}
public Map getFields() {
return fields;
}
public void setFields(Map fields) {
this.fields = fields;
}
public void addField(String name, String field) {
fields.put(name, field);
}
public static HttpPostRequest fromJson(JSONObject request) {
return (HttpPostRequest)JSON.toJavaObject(request, HttpPostRequest.class);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy