diff --git a/core/src/main/java/com/digitalpebble/stormcrawler/protocol/okhttp/HttpProtocol.java b/core/src/main/java/com/digitalpebble/stormcrawler/protocol/okhttp/HttpProtocol.java index 143f3a24d..bf589bbb2 100644 --- a/core/src/main/java/com/digitalpebble/stormcrawler/protocol/okhttp/HttpProtocol.java +++ b/core/src/main/java/com/digitalpebble/stormcrawler/protocol/okhttp/HttpProtocol.java @@ -337,9 +337,14 @@ public ProtocolResponse getProtocolOutput(String url, final Metadata metadata) t String postJSONData = metadata.getFirstValue("http.post.json"); if (StringUtils.isNotBlank(postJSONData)) { - RequestBody body = RequestBody.create(JSON, postJSONData); + RequestBody body = RequestBody.create(postJSONData, JSON); rb.post(body); } + + String useHead = metadata.getFirstValue("http.method.head"); + if ("true".equalsIgnoreCase(useHead)) { + rb.head(); + } } Request request = rb.build();