learning-software-engineering / learning-software-engineering.github.io

MIT License
17 stars 206 forks source link

Using ky a js library for making http requests #464

Closed Shaffaan closed 4 months ago

Shaffaan commented 4 months ago

This PR introduces and talks about KY, a new lightweight HTTP Client PR goes over all that is needed for a new student to set up and start using KY. Examples of GET and POST requests using KY are also provided Small blurb: KY extends the capabilities of the FetchAPI by incorporating features such as retries and cancellations, bolstering the reliability and flexibility of your HTTP requests. With KY, you can effortlessly specify the number of retries for a request using the retry option, ensuring resilience in the face of network issues. Additionally, KY seamlessly integrates with the AbortController provided by the FetchAPI, enabling you to cancel requests when necessary, empowering you with greater control over your network interactions. These enhancements make KY a powerful tool for managing HTTP requests in your web applications.

IanQuan commented 4 months ago

Your README on KY, provides a detailed guide that covers everything from setup and basic usage to advanced features like request cancellation and retries. The structure is clear, making it easy for readers to navigate through the content with the help of a table of contents. Including code snippets for different operations like GET and POST requests is particularly helpful, as it gives practical examples that users can directly experiment with.

To enhance the educational value for developers who are new to KY, consider including examples of common errors or pitfalls users might encounter when using KY and how to resolve them would be beneficial. This could include handling network errors or managing CORS issues.

Shaffaan commented 4 months ago

Thank you for your feedback Ian! I'm glad you found the README helpful. Your suggestion to include examples of common errors and how to resolve them is valuable for enhancing the educational value of the documentation.

I've taken your suggestion on board and have added a section dedicated to addressing common errors and pitfalls users might encounter when using KY. Because most errors users encounter are network-related and common across all fetching libraries, I've decided to list them out in the README but provide links to articles that offer more detailed solutions. Writing them all directly in the README would detract from the main topic and potentially make the document convoluted.

I hope this addition further improves the usability and clarity of the documentation for users who are new to KY. If you have any further suggestions or feedback, please feel free to share!

IanQuan commented 4 months ago

The new section looks good to me, nice work!

Shaffaan commented 4 months ago

Perfect Thankyou so much for your in depth review

Shaffaan commented 4 months ago

Did not know we had to add a link in the techstacks.md file so I did that in a seperate pr and here is the link https://github.com/learning-software-engineering/learning-software-engineering.github.io/pull/577