Explorar el Código

log json post

master
Patrick Peng Sun hace 8 años
padre
commit
6cc79ff8f4
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. +2
    -0
      upload.go

+ 2
- 0
upload.go Ver fichero

@@ -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
}

Cargando…
Cancelar
Guardar