defaultHTTPPostClient is the production HTTP client used by httpPost. It refuses connections to non-public IPs at dial time (defeating DNS rebinding to loopback / RFC1918 / link-local incl. cloud metadata at 169.254.169.254) and bounds redirects at 10 hops.
()
| 31 | // rebinding to loopback / RFC1918 / link-local incl. cloud metadata at |
| 32 | // 169.254.169.254) and bounds redirects at 10 hops. |
| 33 | func defaultHTTPPostClient() httpDoer { |
| 34 | return httpclient.NewSafeClient(30*time.Second, false) |
| 35 | } |
| 36 | |
| 37 | // newHTTPPost returns the http_post builtin bound to client. POSTs args[1] |
| 38 | // to args[0] with Content-Type: application/json. |
no test coverage detected