@@ -277,7 +277,7 @@ std::string testhttpclient_downfilelist(std::shared_ptr<httppeer> peer)
277277 tempurl.append (std::to_string (i));
278278 tempurl.append (urls[1 ]);
279279 a->requst_clear ();
280- a->state .json .clear ();
280+ a->page .json .clear ();
281281 std::cout<<tempurl<<std::endl;
282282 a->get_json (tempurl);
283283 a->add_header (" Connection" , " keep-alive" );
@@ -289,18 +289,18 @@ std::string testhttpclient_downfilelist(std::shared_ptr<httppeer> peer)
289289 if (a->get_status () == 200 )
290290 {
291291 std::cout<<" resp ok" <<std::endl;
292- if (a->state .isjson ==1 )
292+ if (a->page .isjson ==1 )
293293 {
294294 std::cout<<" begin json" <<std::endl;
295- if (a->state .json [" code" ].to_int ()==0 )
295+ if (a->page .json [" code" ].to_int ()==0 )
296296 {
297- if (a->state .json [" data" ].is_array ())
297+ if (a->page .json [" data" ].is_array ())
298298 {
299299 std::cout<<" is_array" <<std::endl;
300300 unsigned int j=0 ;
301- for (;j<a->state .json [" data" ].size ();j++)
301+ for (;j<a->page .json [" data" ].size ();j++)
302302 {
303- std::cout<<" fid:" <<a->state .json [" data" ][j][" aritcleid" ].to_string ()<<std::endl;
303+ std::cout<<" fid:" <<a->page .json [" data" ][j][" aritcleid" ].to_string ()<<std::endl;
304304 }
305305
306306 if (j>0 )
@@ -310,12 +310,12 @@ std::string testhttpclient_downfilelist(std::shared_ptr<httppeer> peer)
310310 }
311311
312312 }
313- else if (a->state .json [" data" ].is_obj ())
313+ else if (a->page .json [" data" ].is_obj ())
314314 {
315315
316316 std::cout<<" is_obj" <<std::endl;
317317 }
318- std::cout << a->state .content << std::endl;
318+ std::cout << a->page .content << std::endl;
319319 continue ;
320320 }
321321 std::cout<<" json error!" <<std::endl;
@@ -381,12 +381,12 @@ std::string testhttpclient_getdownfile(std::shared_ptr<httppeer> peer)
381381 if (a->get_status () == 200 )
382382 {
383383 std::cout<<" ----get ok----\n " <<std::endl;
384- if (a->state .istxt ==false )
384+ if (a->page .istxt ==false )
385385 {
386- if (a->state . page .tempfile .size ()>0 )
386+ if (a->page . file .tempfile .size ()>0 )
387387 {
388- std::cout<<" filename:" <<a->state . page .filename <<std::endl;
389- fileurl = a->state . page .filename ;
388+ std::cout<<" filename:" <<a->page . file .filename <<std::endl;
389+ fileurl = a->page . file .filename ;
390390
391391 client << " <html><head>" ;
392392 client <<" <meta http-equiv=\" refresh\" content=\" 1;url=/downfilecontent\" >" ;
0 commit comments