mirror of
https://github.com/bwssytems/ha-bridge.git
synced 2025-12-18 16:17:30 +00:00
Update Fibaro and Fhem for small changes.
This commit is contained in:
@@ -3,10 +3,14 @@ package com.bwssystems.HABridge.plugins.http;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.bwssystems.HABridge.api.NameValue;
|
||||
import com.bwssystems.HABridge.plugins.http.HTTPHandler;
|
||||
|
||||
public class HttpTestHandler extends HTTPHandler {
|
||||
private static final Logger log = LoggerFactory.getLogger(HttpTestHandler.class);
|
||||
private List<NameValue> theData;
|
||||
|
||||
public void setTheData(String compareValue, String testData) {
|
||||
@@ -35,6 +39,10 @@ public class HttpTestHandler extends HTTPHandler {
|
||||
}
|
||||
|
||||
public String doHttpRequest(String url, String httpVerb, String contentType, String body, NameValue[] headers) {
|
||||
log.info("doHttpRequest with url <<<" + url + ">>>, verb: " + httpVerb + ", contentType: " + contentType + ", body <<<" + body + ">>>" );
|
||||
if(headers != null && headers.length > 0)
|
||||
for(int i = 0; i < headers.length; i++)
|
||||
log.info("header index " + i + " name: <<<" + headers[i].getName() + ">>>, value: <<<" + headers[i].getValue() + ">>>");
|
||||
String responseData = null;
|
||||
for(NameValue aTest:theData) {
|
||||
if(url.contains(aTest.getName()))
|
||||
|
||||
Reference in New Issue
Block a user