Giter VIP home page Giter VIP logo

libcurl_httpclient's Introduction

LibCurl_httpClient

下载 demo 工程之后可直接运行、测试:

测试代码:

using namespace HttpClient;

QVariantMap param;
param.insert("from", "en");
param.insert("to", "zh");
param.insert("q", "apple");
param.insert("appid", "2015063000000001");
param.insert("salt", "1435660288");
param.insert("sign", "f89f9594663708c1605f3d736d01d2d4");

QJsonObject json;

QString urlStr = "http://api.fanyi.baidu.com/api/trans/vip/translate";

Get(urlStr, param, json);
//Form(urlStr, param, json);
//Post(urlStr, param, json);

qDebug() << "\n" << json;

主要文件:

  • HttpDemp/curl 文件夹,libCurl 的库文件
  • HttpDemo/HttpClient.{h|m} 请求库的封装文件

配置:

生成事件-->生成前事件-->命令行: xcopy "$(MSBuildProjectDirectory)\curl\dll\*" "$(MSBuildStartupDirectory)\Debug\"

这个是为了把 libCurl 库的 dll 文件拷贝到工程运行目录 HttpDemo/Debug 下,实际可手动配置

libcurl_httpclient's People

Contributors

jiutianhuanpei avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.