4
गो में पोस्ट अनुरोध में मैं JSON स्ट्रिंग कैसे भेजूं
मैंने Apiary के साथ काम करने की कोशिश की और JSON को नकली सर्वर भेजने के लिए एक सार्वभौमिक टेम्प्लेट बनाया और यह कोड है: package main import ( "encoding/json" "fmt" "github.com/jmcvetta/napping" "log" "net/http" ) func main() { url := "http://restapi3.apiary.io/notes" fmt.Println("URL:>", url) s := napping.Session{} h := &http.Header{} h.Set("X-Custom-Header", …