Skip to content
This repository was archived by the owner on Nov 5, 2024. It is now read-only.

Commit 14c5fbd

Browse files
committed
增加HTTP OPTIONS测试
1 parent a32b329 commit 14c5fbd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

teatesting/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ func StartTestServer() {
223223
}
224224
logs.Println("[test]websocket closed")
225225
}).
226+
Options("/options", func(req *http.Request, resp http.ResponseWriter) {
227+
resp.Header().Set("AllowMethods", "GET, POST")
228+
}).
226229
StartOn("127.0.0.1:9991")
227230
}
228231

0 commit comments

Comments
 (0)