Welcome to the ktor-HTTP repository! This repository contains a collection of projects aimed at building APIs using the Ktor framework. Below, you'll find information about the various projects and a section on contributions.
GET /api/items
Parameter | Type | Description |
---|---|---|
api_key |
string |
Required. Your API key |
GET /api/items/${id}
Parameter | Type | Description |
---|---|---|
id |
string |
Required. Id of item to fetch |
Takes two numbers and returns the sum.
Contributions are always welcome!
See contributing.md
for ways to get started.
Please adhere to this project's code of conduct
.
- Ktor-Http
- Kotlin Embeeded
- CLean Code
- Cross platform
If you have any feedback, please reach out to us at fatiqhussnain1@gmail.com
I'm a Computer Science student At University of Engineering and Technology Lahore Pakistan. I have passion for creating amazing and helpful projects for people. My stacks includes Jetpack Compose. XML. Kotlin. Dart. Flutter. Node.js. Ktor. Python. AI.
Jetpack Compose. XML. Kotlin. Dart. Flutter. Node.js. Ktor. Python. AI.
Here is my other github repository for Api Development using Node.js and Express.js
https://github.com/fatiq123/Api-Development
Clone the project
git clone https://github.com/your-username/Ktor-HTTP.git
cd Ktor-HTTP
Go to the project directory
cd Ktor-HTTP
Application.kt file
import com.example.plugins.*
import io.ktor.server.application.*
import io.ktor.server.engine.*
import io.ktor.server.netty.*
fun main() {
embeddedServer(Netty, port = 8080, host = "0.0.0.0", module = Application::module)
.start(wait = true)
}
fun Application.module() {
configureRouting()
}
Routing.kt file
import io.ktor.server.application.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
fun Application.configureRouting() {
routing {
get("/") {
call.respondText("Hello World!")
}
}
}
Client: Ktor-Kotlin
Server: Ktor-Http Client