Go
Go
Transition from Http.QuickRequestParams to Http.HttpParams
Provides instructions for replacing deprecated QuickRequestParams method calls with HttpParams.Chilkat Go Downloads
success := false
http := chilkat.NewHttp()
verb := "GET"
url := "https://example.com/"
json := chilkat.NewJsonObject()
json.UpdateInt("param1",100)
json.UpdateString("param2","test")
// ------------------------------------------------------------------------
// The QuickRequestParams method is deprecated:
responseObj := http.QuickRequestParams(verb,url,json)
if http.LastMethodSuccess() == false {
fmt.Println(http.LastErrorText())
http.DisposeHttp()
json.DisposeJsonObject()
return
}
// ...
// ...
responseObj.DisposeHttpResponse()
// ------------------------------------------------------------------------
// Do the equivalent using HttpParams.
// Your application creates a new, empty HttpResponse object which is passed
// in the last argument and filled upon success.
responseOut := chilkat.NewHttpResponse()
success = http.HttpParams(verb,url,json,responseOut)
if success == false {
fmt.Println(http.LastErrorText())
http.DisposeHttp()
json.DisposeJsonObject()
responseOut.DisposeHttpResponse()
return
}
http.DisposeHttp()
json.DisposeJsonObject()
responseOut.DisposeHttpResponse()