Sfoglia il codice sorgente

log json post

master
Patrick Peng Sun 8 anni fa
parent
commit
6cc79ff8f4
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. +2
    -0
      upload.go

+ 2
- 0
upload.go Vedi File

@@ -5,6 +5,7 @@ import (
"fmt"
"io"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"os"
@@ -66,5 +67,6 @@ func postJSON(jsonB []byte, targetURL string) (resp string, err error) {
defer r.Body.Close()
b, _ := ioutil.ReadAll(r.Body)
resp = string(b)
log.Println(resp)
return
}

Loading…
Annulla
Salva