wfrest

基于Sogou C++ Workflow开发的高性能异步RESTful网络框架,提供简洁接口和高性能HTTP服务,支持与Workflow互通,便于开发各类网络应用。

Check out wfrest on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

项目地址https://github.com/wfrest/wfrest## 项目描述- 基于Sogou C++ Workflow开发的高性能异步restful网络框架- 低门槛,简洁的接口使c++用户能像go语言的gin,python的flask一样快速开发http restful的应用- 高性能,wfrest提供的http性能优于nginx- 与workflow互通,使得计算调度、异步文件IO等功能的使用更为方便,也可使用workflow的其他功能比如服务治理,mysql,redis等- 代码简洁易读,内部架构精巧,弥补了 workflow 在 web 功能上的不足,同时性能上有保证。- 独特的内存管理方式,不用借助智能指针,让内存管理更加方便### 示例代码:cpp#include "wfrest/HttpServer.h"using namespace wfrest;int main(){ HttpServer svr; // curl -v http://ip:port/hello svr.GET("/hello", [](const HttpReq *req, HttpResp *resp) { resp->String("world\n"); }); // curl -v http://ip:port/data svr.GET("/data", [](const HttpReq *req, HttpResp *resp) { std::string str = "Hello world"; resp->String(std::move(str)); }); // curl -v http://ip:port/post -d 'post hello world' svr.POST("/post", [](const HttpReq *req, HttpResp *resp) { // reference, no copy here std::string& body = req->body(); fprintf(stderr, "post data : %s\n", body.c_str()); }); if (svr.start(8888) == 0) { getchar(); svr.stop(); } else { fprintf(stderr, "Cannot start server"); exit(1); } return 0;}

Latest Weekly Picks

fotominiatur.com favicon
Weekly Pick

AI Foto Edit - Text to Image & Image Edit

foto miniatur
hynote.ai favicon
Weekly Pick

AI-powered note-taking solution that captures, transcribes, and summarizes meetings, documents, and multimedia content in real-time

HyNote AI
chromewebstore.google.com favicon
Weekly Pick

Easily download Sora videos and thumbnails - One-click extraction and save for ChatGPT Sora generated video content

SoraVideoDownloader.com

Create spine-chilling text designs with the Halloween Spooky font.

dreamflow.app favicon
Weekly Pick

Prompt with AI, refine UI visually, or go deep in code. The 3 surfaces stay connected, giving you speed, flexibility, and code you can own.

Abel
fotominiatur.com favicon
Weekly Pick

An AI-powered image generation and editing tool specializing in creating miniature worlds. Offers precise photo editing capabilities to transform ordinary images into imaginative scenes.

ZhangVampire
subway.cuvii.dev favicon
Weekly Pick

An interactive subway network browsing experience that allows users to explore metro systems in a dynamic and engaging way.

thecuvii
github.com favicon
Weekly Pick

A Chrome extension that syncs cookies to Cloudflare, enabling seamless cookie sharing across devices. It features auto-merge/push rules, protobuf encoding, and a management panel for viewing and managing synced cookies.

jackluson