Update Fibaro and Fhem for small changes.

This commit is contained in:
bsamuels
2018-01-23 14:34:49 -06:00
parent 047a7de612
commit 47074ff60f
16 changed files with 259 additions and 121 deletions

View File

@@ -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()))