mirror of
https://github.com/mpolden/echoip.git
synced 2025-07-16 05:53:32 +02:00
api: handle net/http as cli request
This commit is contained in:
@ -70,6 +70,9 @@ func TestGetIP(t *testing.T) {
|
||||
{s.URL, false, "127.0.0.1\n", "curl/7.26.0", 200},
|
||||
{s.URL, false, "127.0.0.1\n", "Wget/1.13.4 (linux-gnu)", 200},
|
||||
{s.URL, false, "127.0.0.1\n", "fetch libfetch/2.0", 200},
|
||||
{s.URL, false, "127.0.0.1\n", "Go 1.1 package http", 200},
|
||||
{s.URL, false, "127.0.0.1\n", "Go-http-client/1.1", 200},
|
||||
{s.URL, false, "127.0.0.1\n", "Go-http-client/2.0", 200},
|
||||
{s.URL + "/x-ifconfig-ip.json", false, toJSON("x-ifconfig-ip", "127.0.0.1"), "", 200},
|
||||
{s.URL, true, toJSON("x-ifconfig-ip", "127.0.0.1"), "", 200},
|
||||
{s.URL + "/foo", false, "no value found for: foo", "curl/7.26.0", 404},
|
||||
|
Reference in New Issue
Block a user