Build a web service to convert temperatures between Celsius, Fahrenheit, and Kelvin.
This challenge is tech-agnostic. Choose your preferred programming language and framework. For beginner level, no database required.
- Handle different conversion types
- Perform mathematical conversions accurately
-
Environment Setup:
- Programming language and web framework
-
Implementation Details:
- Create a GET endpoint at
/convertthat acceptsvalue,from, andtoparameters (e.g., from=celsius, to=fahrenheit)
- Create a GET endpoint at
-
Testing:
- Test with:
GET /convert?value=32&from=fahrenheit&to=celsius
- Test with:
- Add validation for valid temperature ranges
- Support more units
By completing this challenge, you will learn to implement conversion logic in APIs.
Happy coding!