(t *testing.T)
| 42 | fmt.Println(string(res[:])) |
| 43 | } |
| 44 | func TestDoPost(t *testing.T) { |
| 45 | url := "http://dummy.restapiexample.com/api/v1/create" |
| 46 | payload := ` { |
| 47 | "name":"test", |
| 48 | "salary":"123", |
| 49 | "age":"23" |
| 50 | }` |
| 51 | res, _ := DoPost(TypeJson, url, nil, []byte(payload)) |
| 52 | fmt.Println(string(res[:])) |
| 53 | } |
| 54 | func Test_FileServer(t *testing.T) { |
| 55 | err := http.ListenAndServe("localhost:3005", http.FileServer(http.Dir("./"))) |
| 56 | if err != nil { |