https://github.com/localazy/kotlin-mpp-wininet
This project demonstrates how to use the WinInet API in your Kotlin MPP app for simple HTTP communication.
https://github.com/localazy/kotlin-mpp-wininet
http-communication kotlin-mpp libcurl wininet-api
Last synced: 4 months ago
JSON representation
This project demonstrates how to use the WinInet API in your Kotlin MPP app for simple HTTP communication.
- Host: GitHub
- URL: https://github.com/localazy/kotlin-mpp-wininet
- Owner: localazy
- Created: 2020-09-04T19:44:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T19:46:31.000Z (almost 6 years ago)
- Last Synced: 2025-09-29T15:44:32.403Z (9 months ago)
- Topics: http-communication, kotlin-mpp, libcurl, wininet-api
- Language: Kotlin
- Homepage:
- Size: 63.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Kotlin MPP + WinInet
When building a multiplatform app, a recommended library for HTTP communication would be the [ktor clients](https://ktor.io/clients/index.html). However, as it uses libcurl for desktop implementation, it introduces dependencies. On Linux or macOS, libcurl can be easily installed from repositories or through brew. For Windows, however, DLL libraries must be provided.
The option would be to link libcurl statically. It's, however, a bit tricky and it leads to increased size of the resulting binary.
If you only need a few simple HTTP calls, it may be much better to go with WinInet API that is included in Windows by default.
**This project demonstrates how to use the WinInet API in your Kotlin MPP app for simple HTTP communication.**
---
This code is based on what we have developed for [Localazy CLI](https://localazy.com). Read the original article about [how we built our Localazy CLI with Kotlin MPP and Github Actions](https://localazy.com/blog/localazy-cli-sofware-localization-tool-kotlin-github).