// Connect trying to authorize at our chatty-server
Connect trying to authorize at our chatty-server
// Connect trying to authorize at our chatty - server
func (b *Client) Connect() error {
	w, err := b.client.Post(b.URL+constants.RouteApi+constants.RouteAuthorize,
		contentJSON, strings.NewReader(fmt.Sprintf(`{"user": "%s", "password": "%s"}`, b.Username, b.Password)))
	if err != nil {
		return err
	}
	defer w.Body.Close()
	return nil
}
func ( b * Client ) Connect ( ) error { w , err := b . client . Post ( b . URL + constants . RouteApi + constants . RouteAuthorize , contentJSON , strings . NewReader ( fmt . Sprintf ( `{"user": "%s", "password": "%s"}` , b . Username , b . Password ) ) ) if err != nil { return err } defer w . Body . Close ( ) return nil }
Connect trying to authorize at our chatty-server
Connect trying to authorize at our chatty - server