Sample code for 30+ languages & platforms
Go

Example: Http.GetRequestHeader method

Demonstrates the GetRequestHeader method.

Chilkat Go Downloads

Go
    success := false

    http := chilkat.NewHttp()

    hdr1 := "X-CSRF-Token"
    hdr2 := "X-Example"

    http.SetRequestHeader(hdr1,"Fetch")
    http.SetRequestHeader(hdr2,"123ABC")

    fmt.Println(hdr1, ": ", *http.GetRequestHeader(hdr1))
    fmt.Println(hdr2, ": ", *http.GetRequestHeader(hdr2))

    // Output:

    // X-CSRF-Token: Fetch
    // X-Example: 123ABC

    http.DisposeHttp()