当前位置: 首页>>代码示例>>C++>>正文


C++ HttpRequestWorker类代码示例

本文整理汇总了C++中HttpRequestWorker的典型用法代码示例。如果您正苦于以下问题:C++ HttpRequestWorker类的具体用法?C++ HttpRequestWorker怎么用?C++ HttpRequestWorker使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了HttpRequestWorker类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: HttpRequestWorker

void
SWGPrivateApi::getuser() {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/getuser");

    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    

    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGPrivateApi::getuserCallback);

    worker->execute(&input);
}
开发者ID:clinique,项目名称:netatmo-swagger-api,代码行数:25,代码来源:SWGPrivateApi.cpp

示例2: myAppIdPathParam

void
SWGCloudFileApi::saveFileData(QString* myAppId, SWGFileBody fileObj) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("file/{my_app_id}");

    
    QString myAppIdPathParam("{"); myAppIdPathParam.append("myAppId").append("}");
    fullPath.replace(myAppIdPathParam, stringValue(myAppId));
    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "POST");

    

    
    
    
    QString output = fileObj.asJson();
    input.request_body.append(output);
    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGCloudFileApi::saveFileDataCallback);

    worker->execute(&input);
}
开发者ID:CloudBoost,项目名称:swagger,代码行数:33,代码来源:SWGCloudFileApi.cpp

示例3: jobIdPathParam

void
SWGConversionApi::jobsJobIdConversionsGet(QString* xOcToken, QString* xOcApiKey, QString* jobId) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/jobs/{job_id}/conversions");

    
    QString jobIdPathParam("{"); jobIdPathParam.append("jobId").append("}");
    fullPath.replace(jobIdPathParam, stringValue(jobId));
    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    

    

    
    // TODO: add header support
    
    // TODO: add header support
    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGConversionApi::jobsJobIdConversionsGetCallback);

    worker->execute(&input);
}
开发者ID:nirav-programmer,项目名称:onlineconvert-api-sdk-qt5-cpp,代码行数:32,代码来源:SWGConversionApi.cpp

示例4: idPathParam

void
SWGPlansApi::showPlan(QString* id, qint32 year) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/plans/{id}");

    QString idPathParam("{"); idPathParam.append("id").append("}");
    fullPath.replace(idPathParam, stringValue(id));

    if (fullPath.indexOf("?") > 0) 
      fullPath.append("&");
    else 
      fullPath.append("?");
    fullPath.append(QUrl::toPercentEncoding("year"))
        .append("=")
        .append(QUrl::toPercentEncoding(stringValue(year)));


    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    



    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGPlansApi::showPlanCallback);

    worker->execute(&input);
}
开发者ID:vericred,项目名称:vericred-qt5cpp,代码行数:31,代码来源:SWGPlansApi.cpp

示例5: HttpRequestWorker

void
SWGMeasurementsApi::measurementSourcesGet() {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/measurementSources");

    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    

    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGMeasurementsApi::measurementSourcesGetCallback);

    worker->execute(&input);
}
开发者ID:QuantiModo,项目名称:quantimodo-sdk-qt5cpp,代码行数:25,代码来源:SWGMeasurementsApi.cpp

示例6: jobIdPathParam

void
SWGOutputApi::jobsJobIdOutputGet(QString* conversionId, QString* inputId, QString* xOcToken, QString* xOcApiKey, QString* jobId) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/jobs/{job_id}/output");

    
    QString jobIdPathParam("{"); jobIdPathParam.append("jobId").append("}");
    fullPath.replace(jobIdPathParam, stringValue(jobId));
    

    
    
    if(fullPath.indexOf("?") > 0) 
      fullPath.append("&");
    else 
      fullPath.append("?");
    fullPath.append(QUrl::toPercentEncoding("conversionId"))
        .append("=")
        .append(QUrl::toPercentEncoding(stringValue(conversionId)));
    

    
    
    
    if(fullPath.indexOf("?") > 0) 
      fullPath.append("&");
    else 
      fullPath.append("?");
    fullPath.append(QUrl::toPercentEncoding("inputId"))
        .append("=")
        .append(QUrl::toPercentEncoding(stringValue(inputId)));
    

    
    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    

    

    
    // TODO: add header support
    
    // TODO: add header support
    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGOutputApi::jobsJobIdOutputGetCallback);

    worker->execute(&input);
}
开发者ID:nirav-programmer,项目名称:onlineconvert-api-sdk-qt5-cpp,代码行数:56,代码来源:SWGOutputApi.cpp

示例7: HttpRequestWorker

void analyserQ::loadCombobox(){

	HttpRequestWorker *worker = new HttpRequestWorker(this);
	connect(worker, SIGNAL(on_execution_finished(HttpRequestWorker*)), this, SLOT(fillCombobox(HttpRequestWorker*)));

	QString url_str = dbUrl + "/_all_docs";
	HttpRequestInput input(url_str, "GET");
	//input.add_var("key1", "value1");
	//input.add_var("key2", "value2");
	worker->execute(&input);
}
开发者ID:anarkopsykotik,项目名称:proj4a,代码行数:11,代码来源:analyserq.cpp

示例8: HttpRequestWorker

void
SWGJobsApi::jobsGet(QString* status, QString* xOcToken, QString* xOcApiKey, SWGNumber* page) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/jobs");

    

    
    
    if(fullPath.indexOf("?") > 0) 
      fullPath.append("&");
    else 
      fullPath.append("?");
    fullPath.append(QUrl::toPercentEncoding("status"))
        .append("=")
        .append(QUrl::toPercentEncoding(stringValue(status)));
    

    
    
    
    if(fullPath.indexOf("?") > 0) 
      fullPath.append("&");
    else 
      fullPath.append("?");
    fullPath.append(QUrl::toPercentEncoding("page"))
        .append("=")
        .append(QUrl::toPercentEncoding(stringValue(page)));
    

    
    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "GET");

    

    

    
    // TODO: add header support
    
    // TODO: add header support
    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGJobsApi::jobsGetCallback);

    worker->execute(&input);
}
开发者ID:nirav-programmer,项目名称:onlineconvert-api-sdk-qt5-cpp,代码行数:53,代码来源:SWGJobsApi.cpp

示例9: input

void MainWindow::on_pushButton_2_clicked()
{
    QString url_str = "http://localhost/rest_example.php";

    HttpRequestInput input(url_str, "POST");

    QString text = ui->lineEdit->text();

    input.add_var("id", text);

    HttpRequestWorker *worker = new HttpRequestWorker(this);
    connect(worker, SIGNAL(on_execution_finished(HttpRequestWorker*)), this, SLOT(handleResponse(HttpRequestWorker*)));
    worker->execute(&input);
}
开发者ID:tejashwikalptaru,项目名称:qt-restful-php,代码行数:14,代码来源:mainwindow.cpp

示例10: input

void textDialog::on_commandLinkButton_clicked()
{
    QString text;
    //QImage image;

    text=ui->plainTextEdit->toPlainText();
    QString url_str = "http://iqubebase.com/pollvogue-api/public/image/post";

//    QFile imageFile = QFile(fileName);
    QString mimeType = "image/png";

    HttpRequestInput input(url_str, "POST");
    input.add_var("text", text);
    input.add_file("image", fileName ,NULL , mimeType);

    HttpRequestWorker *worker = new HttpRequestWorker(this);
    connect(worker, SIGNAL(on_execution_finished(HttpRequestWorker*)), this, SLOT(handle_result(HttpRequestWorker*)));
    worker->execute(&input);
}
开发者ID:iQubeLabs,项目名称:pollvogue,代码行数:19,代码来源:textdialog.cpp

示例11: csv

void RecordUpdater::internalUpdateRecords(RecordUpdater *record)
{
    CSVReader csv(record->_filename, record->_columnSeparator,
                  record->_numLinesToIgnore, record->_stringDelimiter);

    csv.load();

    QString url = "http://www.hbobroker.com.ar/smartcard/addrecord";

    int recCount = csv.recordCount();

    for (int i = 0; i < recCount; ++i)
    {
        HttpRequestInput input(url, "POST");

        QStringList rec = csv.record(i);

        input.add_var("dni", rec.at(8));
        input.add_var("dominio", rec.at(9));
        input.add_var("asegurado", rec.at(6));
        input.add_var("cobertura", rec.at(22));
        input.add_var("poliza", rec.at(1));
        input.add_var("vigencia_desde", rec.at(4));
        input.add_var("vigencia_hasta", rec.at(5));
        input.add_var("modelo", rec.at(11));
        input.add_var("anio", rec.at(12));
        input.add_var("chasis", rec.at(15));
        input.add_var("motor", rec.at(14));
        input.add_var("medioPago", "S/D");
        input.add_var("Productor", rec.at(24));

        HttpRequestWorker *worker = new HttpRequestWorker(record);
        connect(worker, &HttpRequestWorker::on_execution_finished, record, &RecordUpdater::on_addRecordFinished);
        while(record->_parallelProcesses > 2)
        {
            QThread::sleep(1);
            //QApplication::processEvents();
        }
        worker->execute(&input);
        record->_parallelProcesses++;
    }
}
开发者ID:diegowald,项目名称:dominioSeguro,代码行数:42,代码来源:recordupdater.cpp

示例12: HttpRequestWorker

void
SWGPlansApi::findPlans(SWGRequestPlanFind body) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("/plans/search");



    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "POST");

    
    QString output = body.asJson();
    input.request_body.append(output);
    


    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGPlansApi::findPlansCallback);

    worker->execute(&input);
}
开发者ID:vericred,项目名称:vericred-qt5cpp,代码行数:23,代码来源:SWGPlansApi.cpp

示例13: appIdPathParam

void
SWGCloudFileApi::saveFile(QString* appId, QString* fileObj, QString* key, SWGHttpRequestInputFileElement* fileToUpload) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("file/{app_id}");

    
    QString appIdPathParam("{"); appIdPathParam.append("appId").append("}");
    fullPath.replace(appIdPathParam, stringValue(appId));
    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "POST");

    if (key != NULL) {
        input.add_var("key", *key);
    }
    if (fileObj != NULL) {
        input.add_var("fileObj", *fileObj);
    }
    if (fileToUpload != NULL) {
        input.add_file("fileToUpload", *fileToUpload.local_filename, *fileToUpload.request_filename, *fileToUpload.mime_type);
    }
    

    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGCloudFileApi::saveFileCallback);

    worker->execute(&input);
}
开发者ID:CloudBoost,项目名称:swagger,代码行数:37,代码来源:SWGCloudFileApi.cpp

示例14: appIdPathParam

void
SWGCloudQueryApi::distinct(QString* appId, QString* tableName, SWGCloudQueryDistinct body) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("data/{app_id}/{table_name}/distinct");

    
    QString appIdPathParam("{"); appIdPathParam.append("appId").append("}");
    fullPath.replace(appIdPathParam, stringValue(appId));
    
    QString tableNamePathParam("{"); tableNamePathParam.append("tableName").append("}");
    fullPath.replace(tableNamePathParam, stringValue(tableName));
    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "POST");

    

    
    
    
    QString output = body.asJson();
    input.request_body.append(output);
    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGCloudQueryApi::distinctCallback);

    worker->execute(&input);
}
开发者ID:CloudBoost,项目名称:swagger,代码行数:36,代码来源:SWGCloudQueryApi.cpp

示例15: appIdPathParam

void
SWGCloudQueueApi::addMessage(QString* appId, QString* queueName, SWGQueueBody body) {
    QString fullPath;
    fullPath.append(this->host).append(this->basePath).append("queue/{app_id}/{queue_name}/message");

    
    QString appIdPathParam("{"); appIdPathParam.append("appId").append("}");
    fullPath.replace(appIdPathParam, stringValue(appId));
    
    QString queueNamePathParam("{"); queueNamePathParam.append("queueName").append("}");
    fullPath.replace(queueNamePathParam, stringValue(queueName));
    

    

    HttpRequestWorker *worker = new HttpRequestWorker();
    HttpRequestInput input(fullPath, "PUT");

    

    
    
    
    QString output = body.asJson();
    input.request_body.append(output);
    

    

    connect(worker,
            &HttpRequestWorker::on_execution_finished,
            this,
            &SWGCloudQueueApi::addMessageCallback);

    worker->execute(&input);
}
开发者ID:CloudBoost,项目名称:swagger,代码行数:36,代码来源:SWGCloudQueueApi.cpp


注:本文中的HttpRequestWorker类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。