feature: golang http get request changes to head

This commit is contained in:
omurbekjk 2019-10-07 16:55:09 +06:00
parent 3d9261c7c4
commit fbc217ef35
2 changed files with 2 additions and 2 deletions

View File

@ -1,4 +1,4 @@
<div class="highlight"><pre><span></span><span class="nb">import</span> <span class="s1">&#34;net/http&#34;</span> <div class="highlight"><pre><span></span><span class="nb">import</span> <span class="s1">&#34;net/http&#34;</span>
<span class="nb">import</span> <span class="s1">"fmt"</span> <span class="nb">import</span> <span class="s1">"fmt"</span>
<span class="nx">func main() { </span><span class="p">_, err := http.Get("PING_URL") }</span> <span class="nx">func main() { </span><span class="p">_, err := http.Head("PING_URL") }</span>
</pre></div> </pre></div>

View File

@ -2,7 +2,7 @@ import "fmt"
import "net/http" import "net/http"
func main() { func main() {
_, err := http.Get("PING_URL") _, err := http.Head("PING_URL")
if err != nil { if err != nil {
fmt.Printf("%s", err) fmt.Printf("%s", err)
} }