MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / putGoalHttp

Function putGoalHttp

goal/goal.go:62–70  ·  view source on GitHub ↗
(goal string, configuration config.Configuration)

Source from the content-addressed store, hash-verified

60}
61
62func putGoalHttp(goal string, configuration config.Configuration) error {
63 requestBody, err := json.Marshal(PutGoalRequest{Goal: goal, User: configuration.TimerUser})
64 if err != nil {
65 return err
66 }
67 client := httpclient.CreateHttpClient(configuration.TimerInsecure)
68 _, err = client.SendRequest(requestBody, "PUT", getGoalUrl(configuration))
69 return err
70}
71
72func getGoalUrl(configuration config.Configuration) string {
73 return configuration.TimerUrl + configuration.TimerRoom + "/goal"

Callers 1

setNewGoalFunction · 0.85

Calls 3

CreateHttpClientFunction · 0.92
getGoalUrlFunction · 0.85
SendRequestMethod · 0.65

Tested by

no test coverage detected