func (u *User) request(event js.Value) {
	f, err := ui.NewForm(u.dom.QuerySelectorAll, event)
	if err != nil {
		u.log.Error(err.Error())
		return
	}
	r, err := u.newRequest(*f)
	switch {
	case err != nil:
		u.log.Error(err.Error())
		return
	case r.validator != nil:
		if ok := r.validator(); !ok {
			return
		}
	}
	resp, err := r.do()
	switch {
	case err != nil:
		u.log.Error("making http request: " + err.Error())
		return
	case resp.Code >= 400:
		u.handleResponseError(resp)
		return
	case r.handler != nil:
		r.handler(resp.Body)
	}
}
// Request makes an BLOCKING request to the server using the fields in the form.
Request makes an BLOCKING request to the server using the fields in the form.
// Request makes an BLOCKING request to the server using the fields in the form .
func (u *User) request(event js.Value) {
	f, err := ui.NewForm(u.dom.QuerySelectorAll, event)
	if err != nil {
		u.log.Error(err.Error())
		return
	}
	r, err := u.newRequest(*f)
	switch {
	case err != nil:
		u.log.Error(err.Error())
		return
	case r.validator != nil:
		if ok := r.validator(); !ok {
			return
		}
	}
	resp, err := r.do()
	switch {
	case err != nil:
		u.log.Error("making http request: " + err.Error())
		return
	case resp.Code >= 400:
		u.handleResponseError(resp)
		return
	case r.handler != nil:
		r.handler(resp.Body)
	}
}
func ( u * User ) request ( event js . Value ) { f , err := ui . NewForm ( u . dom . QuerySelectorAll , event ) if err != nil { u . log . Error ( err . Error ( ) ) return } r , err := u . newRequest ( * f ) switch { case err != nil : u . log . Error ( err . Error ( ) ) return case r . validator != nil : if ok := r . validator ( ) ; ! ok { return } } resp , err := r . do ( ) switch { case err != nil : u . log . Error ( " " + err . Error ( ) ) return case resp . Code >= 400 : u . handleResponseError ( resp ) return case r . handler != nil : r . handler ( resp . Body ) } }
Request makes an BLOCKING request to the server using the fields in the form.
Request makes an BLOCKING request to the server using the fields in the form .