summaryrefslogtreecommitdiffstats
path: root/app/command.go
diff options
context:
space:
mode:
authorHarrison Healey <harrisonmhealey@gmail.com>2018-09-07 09:24:18 -0400
committerGitHub <noreply@github.com>2018-09-07 09:24:18 -0400
commit0027d998555d47f9a75a896d8c6c85a8b4645ad0 (patch)
tree4a15d63c143e9891921d75f102dd008852c9abb2 /app/command.go
parent291000703320cc53c3bdecd2553fa4a3021d7234 (diff)
downloadchat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.tar.gz
chat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.tar.bz2
chat-0027d998555d47f9a75a896d8c6c85a8b4645ad0.zip
MM-11855 Add App.HTTPService to allow mocking of HTTP client (#9359)
* MM-11855 Add App.HTTPService to allow mocking of HTTP client * Initialize HTTPService earlier
Diffstat (limited to 'app/command.go')
-rw-r--r--app/command.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/command.go b/app/command.go
index 92c35865a..124668f6b 100644
--- a/app/command.go
+++ b/app/command.go
@@ -244,7 +244,7 @@ func (a *App) ExecuteCommand(args *model.CommandArgs) (*model.CommandResponse, *
req.Header.Set("Content-Type", "application/x-www-form-urlencoded")
}
- if resp, err := a.HTTPClient(false).Do(req); err != nil {
+ if resp, err := a.HTTPService.MakeClient(false).Do(req); err != nil {
return nil, model.NewAppError("command", "api.command.execute_command.failed.app_error", map[string]interface{}{"Trigger": trigger}, err.Error(), http.StatusInternalServerError)
} else {
if resp.StatusCode == http.StatusOK {