This commit is contained in:
Shreyas Goenka 2025-02-03 20:05:30 +01:00
parent 6fabd756f0
commit a40dc8cf3c
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 2 additions and 2 deletions

View File

@ -1,2 +1 @@
LocalOnly = true # Deployment currently fails when run locally; once that is fixed, remove this setting

View File

@ -54,7 +54,7 @@ your test. You can copy the following snippet in your test.toml file:
[[Server]]
Pattern = %s %s
Response = '''
<response here>
<response here>
'''`, req.Method, req.URL.Path)
s.t.Fatalf(msg)
@ -89,6 +89,7 @@ func (s *Server) Handle(pattern string, handler HandlerFunc) {
var reqBody any
if len(body) > 0 && body[0] == '{' {
// serialize the body as is, if it's JSON
reqBody = json.RawMessage(body)
} else {
reqBody = string(body)