I did the absolutely same request on golang and node js
and golang’s response much shorten than node’s
here’s my go code
url := "https://qawe.ua/secure/rest/example/pay/12/500000"
client := &http.Client{}
req, err := http.NewRequest("GET", url, nil)
req.SetBasicAuth(username, passwd)
req.Header.Set("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8")
req.Header.Set("Token", token)
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
and my response
2019/03/24 23:41:23 &{200 OK 200 HTTP/1.1 1 1 map[Expires:[Thu, 01 Jan 1970 00:00:00 GMT]
Server:[nginx/1.14.2] Date:[Sun, 24 Mar 2019 17:41:23 GMT] Content-Type:
[application/json;charset=utf-8] Content-Length:[206] X-Powered-By:[Servlet/3.1 JSP/2.3 (GlassFish
Server Open Source Edition 5.0.1 Java/Oracle Corporation/1.8)] Cache-Control:[no-cache, no-
store, must-revalidate] Connection:[keep-alive] Pragma:[no-cache] Set-Cookie:
[JSESSIONID=0caf0170e89cf5cb716c80739dbf; Path=/secure; Secure; HttpOnly] Access-Control-
Allow-Origin:[*]] 0xc00005e100 206 [] false false map[] 0xc0000f8000 0xc0000c3130}
and in node js returns much much more information