Skip to content

Commit

Permalink
Add new line to server POST response payload
Browse files Browse the repository at this point in the history
When replaying "saved" payloads created by `gosmee client --saveDir`
the response payload printed by `curl` now has a new line character
so the command-line prompt does not share the same line.
  • Loading branch information
portante authored and chmouel committed Apr 27, 2023
1 parent f1cd9d0 commit 044cae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gosmee/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func serve(c *cli.Context) error {
})
w.WriteHeader(http.StatusAccepted)

fmt.Fprintf(w, `{"status":%d, "channel": "%s", "message":"ok"}`, http.StatusAccepted, channel)
fmt.Fprintf(w, "{\"status\": %d, \"channel\": \"%s\", \"message\": \"ok\"}\n", http.StatusAccepted, channel)
})
config := goSmee{}

Expand Down

0 comments on commit 044cae2

Please sign in to comment.