Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

amocrm_auth

package main

import (
    "fmt"
    "bytes"
    "io/ioutil"
    "net/http"
)

func main() {
    url := "https://certitdev.amocrm.ru/private/api/auth.php?type=json"
    fmt.Println("URL:>", url)

    var jsonStr = []byte(`{"USER_LOGIN":"[email protected]","USER_HASH":"310b7548f578c050856fd92a59d0e73d6414ec6b"}`)
    req, err := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
    req.Header.Set("Content-Type", "application/json")
    
    client := &http.Client{}
    resp, err := client.Do(req)
    if err != nil {
        panic(err)
    }
    defer resp.Body.Close()

    fmt.Println("response Status:", resp.Status)
    fmt.Println("response Headers:", resp.Header)
    body, _ := ioutil.ReadAll(resp.Body)
    fmt.Println("response Body:", string(body))
}

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.