All Projects → YeeYoungHan → cpphttpstack

YeeYoungHan / cpphttpstack

Licence: GPL-3.0 license
c++ api for http client & server

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
Makefile
30231 projects
javascript
184084 projects - #8 most used programming language
C#
18002 projects
HTML
75241 projects

Projects that are alternatives of or similar to cpphttpstack

Flogo Contrib
Flogo Contribution repo. Contains activities, triggers, models and actions.
Stars: ✭ 60 (+100%)
Mutual labels:  http-client, http-server
Fs2 Http
Http Server and client using fs2
Stars: ✭ 132 (+340%)
Mutual labels:  http-client, http-server
Akka Http
The Streaming-first HTTP server/module of Akka
Stars: ✭ 1,163 (+3776.67%)
Mutual labels:  http-client, http-server
Http Kit
http-kit is a minimalist, event-driven, high-performance Clojure HTTP server/client library with WebSocket and asynchronous support
Stars: ✭ 2,234 (+7346.67%)
Mutual labels:  http-client, http-server
Donkey
Modern Clojure HTTP server and client built for ease of use and performance
Stars: ✭ 199 (+563.33%)
Mutual labels:  http-client, http-server
Jiny
Lightweight, modern, simple JVM web framework for rapid development in the API era
Stars: ✭ 40 (+33.33%)
Mutual labels:  http-client, http-server
Qtnetworkng
QtNetwork Next Generation. A coroutine based network framework for Qt/C++, with more simpler API than boost::asio.
Stars: ✭ 125 (+316.67%)
Mutual labels:  http-client, http-server
Lithium
Easy to use C++17 HTTP Server with no compromise on performances. https://matt-42.github.io/lithium
Stars: ✭ 523 (+1643.33%)
Mutual labels:  http-client, http-server
Httpp
Micro http server and client written in C++
Stars: ✭ 144 (+380%)
Mutual labels:  http-client, http-server
Aiohttp
Asynchronous HTTP client/server framework for asyncio and Python
Stars: ✭ 11,972 (+39806.67%)
Mutual labels:  http-client, http-server
Cxxhttp
Asynchronous, Header-only C++ HTTP-over-(TCP|UNIX Socket|STDIO) Library
Stars: ✭ 24 (-20%)
Mutual labels:  http-client, http-server
Http4s
A minimal, idiomatic Scala interface for HTTP
Stars: ✭ 2,173 (+7143.33%)
Mutual labels:  http-client, http-server
Sylar
C++高性能分布式服务器框架,webserver,websocket server,自定义tcp_server(包含日志模块,配置模块,线程模块,协程模块,协程调度模块,io协程调度模块,hook模块,socket模块,bytearray序列化,http模块,TcpServer模块,Websocket模块,Https模块等, Smtp邮件模块, MySQL, SQLite3, ORM,Redis,Zookeeper)
Stars: ✭ 895 (+2883.33%)
Mutual labels:  http-client, http-server
Foxy
Session-based Beast/Asio wrapper requiring C++14
Stars: ✭ 57 (+90%)
Mutual labels:  http-client, http-server
Poco
The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
Stars: ✭ 5,762 (+19106.67%)
Mutual labels:  http-client, http-server
Zio Tls Http
100% non-blocking, Java NIO only( inspired by zio-nio) , JSON HTTP server based on Scala ZIO library. Everything including TLS encryption modeled as ZIO effects, convenient route DSL similar to https4s, up to 30K TPS local JSON transaction with 25 threads on 6 cores(i7) with ZIO fibers.
Stars: ✭ 71 (+136.67%)
Mutual labels:  http-client, http-server
Http
Event-driven, streaming HTTP client and server implementation for ReactPHP.
Stars: ✭ 507 (+1590%)
Mutual labels:  http-client, http-server
Apfree wifidog
A hight performance and lightweight captive portal solution for HTTP(s)
Stars: ✭ 519 (+1630%)
Mutual labels:  http-client, http-server
Http4k
The Functional toolkit for Kotlin HTTP applications. http4k provides a simple and uniform way to serve, consume, and test HTTP services.
Stars: ✭ 1,883 (+6176.67%)
Mutual labels:  http-client, http-server
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+11083.33%)
Mutual labels:  http-client, http-server

C++ HTTP stack 라이브러리

C++ STL 기반으로 HTTP 서버 및 클라이언트 개발용 라이브러리를 개발하는 프로젝트입니다.

개요

  • C++ STL 라이브러리를 이용한 HTTP 클라이언트 및 서버 라이브러리 개발

개발자 정보

본 프로젝트를 진행하는 개발자 정보는 다음과 같습니다.

라이선스

  • 본 프로젝트의 라이선스는 GPLv3 이고 기업용 라이선스는 [email protected] 으로 문의해 주세요.

개발툴

  • 윈도우 : Visual C++ 2008, 2017
  • 리눅스 : g++

API 문서

폴더 설명

  • doc

    • 본 프로젝트와 관련된 문서 저장 폴더
  • HtmlParser

    • HTML 문서를 파싱/생성하는 라이브러리
  • Http2Parser

    • HTTP/2 프로토콜 파싱/생성하는 라이브러리
  • HttpNoCacheProxy

    • HTTP 캐시 기능을 사용하지 않는 HTTP Proxy 서비스
  • HttpParser

    • HTTP 프로토콜 파서/생성 라이브러리
  • HttpSimulator

    • HTTP 시뮬레이터 프로그램
  • HttpSpeed

    • 웹서버 성능 테스트 프로그램
  • HttpStack

    • HTTP 클라이언트/서버 라이브러리
    • WebSocket 서버 라이브러리
  • JsonParser

    • JSON 문자열 파싱 및 생성 라이브러리
  • openssl

    • MS 윈도우용 openssl 라이브러리
    • 리눅스 64bit openssl 라이브러리
  • Publish

    • MS 윈도우용 배포 프로그램 저장 폴더
  • SendFirebaseMessage

    • HTTP stack 기반으로 FirebaseMessage 를 전송하는 예제 프로그램
  • SipPlatform

  • TcpStack

    • TCP 클라이언트/서버 라이브러리
    • HttpStack 에서 HTTP 서버 개발에 사용된다.
  • WsdlParser

    • WSDL 문서를 파싱하는 라이브러리
  • XmlParser

    • XML 문서를 파싱하는 라이브러리
  • TestHttp2Client

    • HTTP/2 클라이언트 테스트 프로그램
  • TestHttpClient

    • HTTP/1.1 클라이언트 테스트 프로그램
  • TestHttpStack

    • HttpStack 을 이용한 간단한 HTTP/1.1 & HTTP/2 서버 샘플 프로그램
    • HttpStack 을 이용한 WebSocket echo 서버 프로그램
  • TestHttpStackMfc

    • MFC 기반으로 HttpStack 을 이용한 간단한 HTTP 서버 샘플 프로그램
  • TestWebRtc

컴파일 방법

본 프로젝트의 컴파일 방법은 다음과 같습니다.

  • VC++ 2008

    • HttpStack.sln 더블클릭한 후, 빌드한다.
    • Visual Studio 2008 버전 9.0.30729.1 SP 에서 빌드할 것을 권장합니다.
  • VC++ 2017

    • HttpStack-vs2017.sln 더블클릭한 후, 빌드한다.
  • 64bit 리눅스

    • make 를 실행하여서 빌드한다.
  • 32bit 리눅스

    • openssl 1.0.2 버전 이상의 개발 라이브러리를 설치한다.
    • make 를 실행하여서 빌드한다.

HTTP GET 요청/응답 개발 방법

HttpStack 라이브러리의 CHttpClient 클래스를 이용한 HTTP GET 프로토콜 연동하는 소스 코드 예제는 다음과 같습니다. 테스트용 샘플 소스 코드는 TestHttpClient 프로젝트의 TestHttpClientGet.cpp 파일입니다.

 CHttpClient clsClient;
 std::string strBodyType, strBody;

 clsClient.DoGet( "http://www.naver.com", strBodyType, strBody );

HTTP POST 요청/응답 개발 방법

HttpStack 라이브러리의 CHttpClient 클래스를 이용한 HTTP POST 프로토콜 연동하는 소스 코드 예제는 다음과 같습니다. 테스트용 샘플 소스 코드는 TestHttpClient 프로젝트의 TestHttpClientPost.cpp 파일입니다.

 std::string strSendBody, strRecvBodyType, strRecvBody;
 CHttpClient clsClient;
 HTTP_HEADER_LIST clsHeaderList;
 CHttpHeader clsHeader( "SOAPAction", "http://www.webserviceX.NET/GetWeather" );

 strSendBody = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://www.webserviceX.NET\">"
   "<soapenv:Header/>"
   "<soapenv:Body>"
      "<web:GetWeather>"
         "<web:CityName>seoul</web:CityName>"
         "<web:CountryName>kr</web:CountryName>"
      "</web:GetWeather>"
   "</soapenv:Body>"
  "</soapenv:Envelope>";

  clsClient.DoPost( "http://www.webserviceX.NET/globalweather.asmx", &clsHeaderList, "text/xml;charset=UTF-8", strSendBody.c_str(), strRecvBodyType, strRecvBody );

HTTP SOAP 요청/응답 개발 방법

HttpStack 라이브러리의 CHttpClient 클래스를 이용한 웹 서비스 연동하는 소스 코드 예제는 다음과 같습니다. 테스트용 샘플 소스 코드는 TestHttpClient 프로젝트의 TestHttpClientSoap.cpp 파일입니다.

 std::string strSendBody, strRecvBody;
 CHttpClient clsClient;

 strSendBody = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://www.webserviceX.NET\">"
   "<soapenv:Header/>"
   "<soapenv:Body>"
      "<web:GetWeather>"
         "<web:CityName>seoul</web:CityName>"
         "<web:CountryName>kr</web:CountryName>"
      "</web:GetWeather>"
   "</soapenv:Body>"
  "</soapenv:Envelope>";

 clsClient.DoSoap( "http://www.webserviceX.NET/globalweather.asmx", "http://www.webserviceX.NET/GetWeather", strSendBody.c_str(), strRecvBody );

초간단 HTTP 서버 개발 방법

초간단 HTTP 서버 개발 소스 코드 예제는 TestHttpStack 프로젝트에 있습니다. TestHttpStack 프로젝트 소스 코드를 참고하시면 CHttpStack 을 이용하여서 어떻게 HTTP 서버를 개발할 수 있을지 확인하실 수 있습니다.

WSDL 문서로 SOAP 통신용 클래스 생성 방법

WSDL 파일을 읽어서 SOAP 통신용 클래스 생성하는 소스 코드 예제는 다음과 같습니다. 테스트용 샘플 소스 코드는 TestWsdlParser 프로젝트를 확인해 보세요.

 CWsdlMessage clsWsdl;

 if( clsWsdl.ParseFile( "globalweather.xml" ) == false )
 {
  printf( "clsWsdl.Parse error\n" );
 }
 else
 {
  clsWsdl.GetSoap()->MakeSource( NULL );
 }

생성한 SOAP 통신용 클래스로 SOAP 통신하는 방법

위에서 WSDL 문서로 생성한 SOAP 클래스로 SOAP 통신하여서 응답을 수신하는 소스 코드는 다음과 같습니다.

 CSoapGlobalWeatherSoap clsSoap;
 std::string strInput, strOutput;

 strInput = "korea";

 if( clsSoap.GetCitiesByCountry( strInput, strOutput ) == false ) return false;

 printf( "[%s]\n", strOutput.c_str() );

JSON 문자열 파싱 및 생성하는 방법

TestJsonParser 폴더의 소스 코드를 참고하세요.

관련 포스트

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].