c++builder PM2.5

    TMemoryStream *ms = new TMemoryStream();
    this->NetHTTPClient1->Get("http://www.pm25.in/api/querys/pm2_5.json?city=zhuhai&token=5j1znBVAsnSf5xQyNQyq", ms);
    TStringStream *ss = new TStringStream("", System::Sysutils::TEncoding::UTF8, false);
    ss->CopyFrom(ms, ms->Size);
    this->Memo1->Text = ss->DataString;

    delete ms;

 

posted on 2015-12-02 11:13  lypzxy  阅读(326)  评论(0编辑  收藏  举报