Test makehandler

This commit is contained in:
Alex
2017-01-24 20:54:24 +00:00
committed by Alex Ellis
parent e35fc06745
commit 34e3d26177
4 changed files with 70 additions and 5 deletions

View File

@ -45,12 +45,14 @@ func makeRequestHandler(config *WatchdogConfig) func(http.ResponseWriter, *http.
w.Write(response.Bytes())
return
}
w.WriteHeader(200)
if config.writeDebug == true {
os.Stdout.Write(out)
}
w.WriteHeader(200)
w.Write(out)
} else {
w.WriteHeader(http.StatusMethodNotAllowed)
}
}
}