Skip to content

libHttpClient is still under construction and is not ready to use. You can review the goals below to see what shape the project will have in its final form. If you want to contribute on the project, please talk to us to avoid overlap.

License

Notifications You must be signed in to change notification settings

vincentlao/libHttpClient

 
 

Repository files navigation

Welcome!

libHttpClient is still under construction and is not ready to use.
You can review the goals below to see what shape the project will have in its final form. If you want to contribute to the project, please talk to us to avoid overlap.

Goals

HTTP API Usage

See public header

  1. Optionally call HCMemSetFunctions() to control memory allocations
  2. Call HCGlobalInitialize()
  3. Optionally call HCSettingsSet*()
  4. Call HCHttpCallCreate() to create a new HC_CALL_HANDLE
  5. Call HCHttpCallRequestSet*() to prepare the HC_CALL_HANDLE
  6. Call HCHttpCallPerform() to perform an HTTP call using the HC_CALL_HANDLE. This call is asynchronous, so the work will be done on task thread and it will return via the callback.
  7. Call HCHttpCallResponseGet*() to get the HTTP response of the HC_CALL_HANDLE
  8. Call HCHttpCallCleanup() to cleanup the HC_CALL_HANDLE
  9. Repeat 4-8 for each new HTTP call
  10. Call HCGlobalCleanup() at shutdown before your memory manager set in step 1 is shutdown

Behavior control

  • On UWP, XDK ERA, iOS, and Android, HCHttpCallPerform() will call native platform APIs
  • Optionally call HCGlobalSetHttpCallPerformFunction() to do your own HTTP handling using HCHttpCallRequestGet*(), HCHttpCallResponseSet*(), and HCSettingsGet*()
  • See sample CustomHttpImplWithCurl how to use this callback plus Curl https://github.com/curl/curl to make an HTTP implementation using Curl.

TODO

Big things that still need to be done in rough priority order:

  • [Done] Prototype XSAPI on top of libHttpClient HTTP stack
  • [Done] Switch to libHttpClient's task API in https://github.com/Microsoft/xbox-live-unity-plugin/tree/libHttpClient
  • [Done] Flush out XML doc comments in header
  • [Done] Win32 project & implementation
  • [Done] Standalone C++ JSON parser
  • [Done] Prototype XSAPI on top of libHttpClient async task stack
  • Retry logic
  • Throttling logic
  • XDK project & XDK implementation calling XDK platform HTTP APIs
  • XDK ERA sample
  • API for binary request & response data
  • Design WebSocket APIs
  • Flushout of UWP implementation calling UWP platform WebSocket APIs
  • XDK project & XDK implementation calling XDK platform WebSocket APIs
  • Prototype XSAPI on top of libHttpClient WebSocket stack
  • P/Invoke layer and UWP C# sample
  • libHttpClient Unity sample (using P/Invoke layer)
  • iOS project & iOS implementation calling iOS platform HTTP APIs
  • iOS implementation calling iOS platform WebSocket APIs
  • iOS sample
  • Android project & Android implementation calling Android platform HTTP APIs
  • Android implementation calling Android platform WebSocket APIs
  • Android sample
  • libHttpClient Unity iOS/Android sample (using P/Invoke layer)

How to clone repo

This repo contains submodules. There are two ways to make sure you get submodules.

When initially cloning, make sure you use the "--recursive" option. i.e.:

git clone --recursive https://github.com/Microsoft/libHttpClient.git

If you already cloned the repo, you can initialize submodules with:

git submodule sync
git submodule update --init --recursive

Note that using GitHub's feature to "Download Zip" does not contain the submodules and will not properly build. Please clone recursively instead.

Contribute Back!

Is there a feature missing that you'd like to see, or have you found a bug that you have a fix for? Or do you have an idea or just interest in helping out in building the library? Let us know and we'd love to work with you. For a good starting point on where we are headed and feature ideas, take a look at our requested features and bugs.

Big or small we'd like to take your contributions back to help improve the Xbox Live Service API for everyone.

Having Trouble?

We'd love to get your review score, whether good or bad, but even more than that, we want to fix your problem. If you submit your issue as a Review, we won't be able to respond to your problem and ask any follow-up questions that may be necessary. The most efficient way to do that is to open a an issue in our issue tracker.

Xbox Live GitHub projects

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

About

libHttpClient is still under construction and is not ready to use. You can review the goals below to see what shape the project will have in its final form. If you want to contribute on the project, please talk to us to avoid overlap.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 91.9%
  • C# 3.5%
  • Batchfile 2.0%
  • C 1.5%
  • CMake 1.1%