(t *testing.T)
| 934 | } |
| 935 | |
| 936 | func Test_Request_Head(t *testing.T) { |
| 937 | t.Parallel() |
| 938 | |
| 939 | app, ln, start := createHelperServer(t) |
| 940 | app.Head("/", func(c fiber.Ctx) error { |
| 941 | return c.SendString(c.Hostname()) |
| 942 | }) |
| 943 | |
| 944 | go start() |
| 945 | time.Sleep(100 * time.Millisecond) |
| 946 | |
| 947 | client := New().SetDial(ln) |
| 948 | |
| 949 | for range 5 { |
| 950 | resp, err := AcquireRequest(). |
| 951 | SetClient(client). |
| 952 | Head("http://example.com") |
| 953 | |
| 954 | require.NoError(t, err) |
| 955 | require.Equal(t, fiber.StatusOK, resp.StatusCode()) |
| 956 | require.Empty(t, resp.String()) |
| 957 | resp.Close() |
| 958 | } |
| 959 | } |
| 960 | |
| 961 | func Test_Request_Put(t *testing.T) { |
| 962 | t.Parallel() |
nothing calls this directly
no test coverage detected