Commit 7043bbb0 by wutong

传递一个空的requestbody

parent 8b684e88
......@@ -6,6 +6,7 @@ import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import java.io.IOException;
......@@ -15,8 +16,9 @@ public class SkuWarehouseRedundancyJob implements SimpleJob {
private PropertiesUtil propertiesUtil = PropertiesUtil.getInstance("const");
@Override
public void execute(ShardingContext shardingContext) {
RequestBody requestBody = RequestBody.create(null, new byte[]{});
Request request = new Request.Builder().url(propertiesUtil.getPropertyAsString("SKUWAREHOUSEREDUNDANCY_URL"))
.post(null)
.post(requestBody)
.addHeader("Content-Type", "application/json")
.build();
Response response = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment