//g++ -std=c++11 -o testhttp_get testhttp_get.cc -I/usr/local/include/workflow -lworkflow
#include <netdb.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <assert.h>
#include <sys/time.h>
#include <vector>
#include <iostream>
#include "workflow/HttpMessage.h"
#include "workflow/HttpUtil.h"
#include "workflow/WFTaskFactory.h"
#include "workflow/WFFacilities.h"
#define REDIRECT_MAX 5
#define RETRY_MAX 2
static int task_num = 10;
static WFFacilities::WaitGroup wait_group(task_num);//
std::string get_filename(std::string resource){
std::string::size_type startpos = 0;
while (startpos!= std::string::npos)
{
startpos = resource.find('/'); //找到'.'的位置
if( startpos != std::string::npos ) //std::string::npos表示没有找到该字符
{
resource.replace(startpos,1,"_");
搜狗workflow--03.异步http请求
最新推荐文章于 2025-03-02 15:33:30 发布