func (self *HttpDownloader) downloadJson(p *context.Response, req *context.Request) *context.Response {
	var err error
	p, destbody := self.downloadFile(p, req)
	if !p.IsSucc() {
		return p
	}

	var body []byte
	body = []byte(destbody)
	mtype := req.GetRespType()
	if mtype == "jsonp" {
		tmpstr := util.JsonpToJson(destbody)
		body = []byte(tmpstr)
	}

	var r *simplejson.Json
	if r, err = simplejson.NewJson(body); err != nil {
		reporter.Log.Println(string(body) + "\t" + err.Error())
		p.SetStatus(true, err.Error())
		return p
	}

	// json result
	p.SetBodyStr(string(body)).SetJson(r).SetStatus(false, "")

	return p
}
func (self *HttpDownloader) Download(req *context.Request) *context.Response {
	var mtype string
	var p = context.NewResponse(req)
	mtype = req.GetRespType()
	switch mtype {
	case "html":
		return self.downloadHtml(p, req)
	case "json":
		fallthrough
	case "jsonp":
		return self.downloadJson(p, req)
	case "text":
		return self.downloadText(p, req)
	default:
		reporter.Log.Println("error request type:" + mtype)
	}
	return p
}