We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b6c60a2 commit f9fb708Copy full SHA for f9fb708
internal/mbtest/test_server.go
@@ -10,9 +10,9 @@ import (
10
)
11
12
type request struct {
13
- Body []byte
14
- Method string
15
- URL *url.URL
+ Body []byte
+ ContentType, Method string
+ URL *url.URL
16
}
17
18
// Request contains the lastly received http.Request by the fake server.
@@ -35,8 +35,9 @@ func EnableServer(m *testing.M) {
35
func initAndStartServer() {
36
server = httptest.NewTLSServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
37
Request = request{
38
- Method: r.Method,
39
- URL: r.URL,
+ ContentType: r.Header.Get("Content-Type"),
+ Method: r.Method,
40
+ URL: r.URL,
41
42
43
var err error
0 commit comments