mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
new: centralized logging and implemented DELETE /api/events route, closes #5
This commit is contained in:
parent
269d7d845b
commit
f1f146d3d7
21 changed files with 144 additions and 184 deletions
|
@ -54,8 +54,6 @@ func (j *JSResponse) ToResponse(req *http.Request) (resp *http.Response) {
|
|||
parts := strings.SplitN(header, ":", 2)
|
||||
if len(parts) == 2 {
|
||||
resp.Header.Add(parts[0], parts[1])
|
||||
} else {
|
||||
log.Warningf("Unexpected header '%s'", header)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -67,7 +65,6 @@ func (j *JSResponse) ReadBody() string {
|
|||
|
||||
raw, err := ioutil.ReadAll(j.resp.Body)
|
||||
if err != nil {
|
||||
log.Errorf("Could not read response body: %s", err)
|
||||
return ""
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue