Java语言API请求示例
Unirest方式获取
获取邮件列表
Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://domain-open-api.cuiqiu.com/v1/box/list") .multiPartContent() .field("mail_id", "nM5GLra9Wo") .field("token", "4dfd31985d7e417cb8062b402950efb0") .field("start_time", "2021-07-15") .field("end_time", "2021-07-16") .field("page", "1") .field("limit", "10") .asString();
获取邮件详细
Unirest.setTimeouts(0, 0); HttpResponse<String> response = Unirest.post("https://domain-open-api.cuiqiu.com/v1/box/detail") .multiPartContent() .field("mail_id", "08EJ98s9dWz") .field("token", "f76a1b32bacc4279bd6b731e59d8hj8837") .field("box_id", "23094") .asString();
OkHttp方式获取
获取邮件列表
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("mail_id","nM5GLra9Wo") .addFormDataPart("token","4dfd31985d7e417cb8062b402950efb0") .addFormDataPart("start_time","2021-07-15") .addFormDataPart("end_time","2021-07-16") .addFormDataPart("page","1") .addFormDataPart("limit","10") .build(); Request request = new Request.Builder() .url("https://domain-open-api.cuiqiu.com/v1/box/list") .method("POST", body) .build(); Response response = client.newCall(request).execute();
获取邮件详细
OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("text/plain"); RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM) .addFormDataPart("mail_id","08EJ98s9dWz") .addFormDataPart("token","f76a1b32bacc4279bd6b731e59d8hj8837") .addFormDataPart("box_id","23094") .build(); Request request = new Request.Builder() .url("https://domain-open-api.cuiqiu.com/v1/box/detail") .method("POST", body) .build(); Response response = client.newCall(request).execute();
我的域名绑定企业微信或者阿里邮箱了,是否可以继续使用脆球邮箱?
脆球邮箱主要用于账号注册,而非工作邮箱,您可以把二级域名作为脆球邮箱使用。 比如您购买的域名是:abc.com […]