func handleUpdateRelation(w http.ResponseWriter, r *http.Request) {
	cxt := appengine.NewContext(r)
	chRes := make(chan *common.Result)
	defer func() {
		if err := recover(); err != nil {
			cxt.Errorf("handleUpdateRelation: %v", err)
			fmt.Fprintf(w, `{"status":%d}`, common.STATUS_ERR)
		}
	}()
	args := r.URL.Query()
	fri := args[common.FRI][0] //An id of friend who will be checked.
	rel := args[common.REL][0] //Update relation between me and user:  0-cancle，1-follow

	re, _ := strconv.Atoi(rel)
	f, _ := strconv.Atoi(fri)

	cookies := r.Cookies()           //Session in cookies passt
	session := cookies[0].Value      //Get user-session
	access_token := cookies[1].Value //Get user-token

	go personal.UpdateReleation(cxt, session, access_token, f, re, chRes)
	pRes := <-chRes
	s := fmt.Sprintf(`{"status":%d, "result":%s}`, common.STATUS_OK, pRes.String())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
//Update relation between me and user.
Update relation between me and user.
// Update relation between me and user .
func handleUpdateRelation(w http.ResponseWriter, r *http.Request) {
	cxt := appengine.NewContext(r)
	chRes := make(chan *common.Result)
	defer func() {
		if err := recover(); err != nil {
			cxt.Errorf("handleUpdateRelation: %v", err)
			fmt.Fprintf(w, `{"status":%d}`, common.STATUS_ERR)
		}
	}()
	args := r.URL.Query()
	fri := args[common.FRI][0] 
	rel := args[common.REL][0] 
	re, _ := strconv.Atoi(rel)
	f, _ := strconv.Atoi(fri)
	cookies := r.Cookies()           
	session := cookies[0].Value      
	access_token := cookies[1].Value 
	go personal.UpdateReleation(cxt, session, access_token, f, re, chRes)
	pRes := <-chRes
	s := fmt.Sprintf(`{"status":%d, "result":%s}`, common.STATUS_OK, pRes.String())
	w.Header().Set("Content-Type", common.API_RESTYPE)
	fmt.Fprintf(w, s)
}
func handleUpdateRelation ( w http . ResponseWriter , r * http . Request ) { cxt := appengine . NewContext ( r ) chRes := make ( chan * common . Result ) defer func ( ) { if err := recover ( ) ; err != nil { cxt . Errorf ( " " , err ) fmt . Fprintf ( w , `{"status":%d}` , common . STATUS_ERR ) } } ( ) args := r . URL . Query ( ) fri := args [ common . FRI ] [ 0 ] rel := args [ common . REL ] [ 0 ] re , _ := strconv . Atoi ( rel ) f , _ := strconv . Atoi ( fri ) cookies := r . Cookies ( ) session := cookies [ 0 ] . Value access_token := cookies [ 1 ] . Value go personal . UpdateReleation ( cxt , session , access_token , f , re , chRes ) pRes := <- chRes s := fmt . Sprintf ( `{"status":%d, "result":%s}` , common . STATUS_OK , pRes . String ( ) ) w . Header ( ) . Set ( " " , common . API_RESTYPE ) fmt . Fprintf ( w , s ) }
Update relation between me and user.
Update relation between me and user .
//An id of friend who will be checked. //Update relation between me and user:  0-cancle，1-follow //Session in cookies passt //Get user-session //Get user-token