dice icon indicating copy to clipboard operation
dice copied to clipboard

ENH: Add cURL Examples to HTTP Docs

Open vanshavenger opened this issue 1 year ago • 11 comments

#1113

  1. Added Curl Examples to HTTP Docs. For Better DX.
  2. Fixed Response which we actually get from the calls.

Attaching screenshots for the same. Screenshot 2024-10-17 at 12 37 41 PM Screenshot 2024-10-17 at 12 38 02 PM Screenshot 2024-10-17 at 12 38 14 PM Screenshot 2024-10-17 at 12 38 33 PM Screenshot 2024-10-17 at 12 38 43 PM

Incase of any changes please let me know.

cc @JyotinderSingh

vanshavenger avatar Oct 17 '24 07:10 vanshavenger

Is there a way we can have a tabbed layout for the request and curl command? The first tab could show the existing content, and the second tab could be titled "cURL" and display the curl request when clicked.

JyotinderSingh avatar Oct 17 '24 07:10 JyotinderSingh

Hi, I think the suggestion of having a tabbed layout is fantastic. I found one resource if that helps: https://docusaurus.io/docs/next/markdown-features/tabs.

Looking forward to see this change.

Thanks Apoorv

apoorvyadav1111 avatar Oct 17 '24 07:10 apoorvyadav1111

@JyotinderSingh @apoorvyadav1111
Done sir

Here the Attached Screenshots, Kindly check once.

Screenshot 2024-10-17 at 2 34 36 PM Screenshot 2024-10-17 at 2 34 41 PM Screenshot 2024-10-17 at 2 34 45 PM Screenshot 2024-10-17 at 2 34 50 PM Screenshot 2024-10-17 at 2 34 55 PM Screenshot 2024-10-17 at 2 34 59 PM Screenshot 2024-10-17 at 2 35 03 PM Screenshot 2024-10-17 at 2 35 06 PM Screenshot 2024-10-17 at 2 35 10 PM Screenshot 2024-10-17 at 2 35 13 PM

Kindly let me know in case of further changes. 🚀

vanshavenger avatar Oct 17 '24 09:10 vanshavenger

Hi @vanshavenger , I tried the changes in my local and they look way better now. I am curious about syncing the tabs. When you click cURL on one, it will update for every other tab. What do you think about this idea?

apoorvyadav1111 avatar Oct 17 '24 09:10 apoorvyadav1111

@apoorvyadav1111 Done sir!!!

vanshavenger avatar Oct 17 '24 09:10 vanshavenger

Kindly check and let me know if you like it

vanshavenger avatar Oct 17 '24 09:10 vanshavenger

Hi @vanshavenger , some of the requests use localhost:8082 and some use your_server_url. We need to ensure we keep only one. I am not sure about which one. Maybe @JyotinderSingh can share his views on this.

apoorvyadav1111 avatar Oct 17 '24 10:10 apoorvyadav1111

@apoorvyadav1111 Ig we should keep it your_server_url as it is more generic. As Developers can run it on their instances or local host. and PORT also be PORT everywhere. as it can be config with --http-port flag.

Will wait for @JyotinderSingh inputs for the same and will commit new changes based on that.

vanshavenger avatar Oct 17 '24 10:10 vanshavenger

@apoorvyadav1111 Ig we should keep it your_server_url as it is more generic.

As Developers can run it on their instances or local host. and PORT also be PORT everywhere. as it can be config with --http-port flag.

Will wait for @JyotinderSingh inputs for the same and will commit new changes based on that.

This sounds good to me, let's keep it as your_server_url.

JyotinderSingh avatar Oct 17 '24 12:10 JyotinderSingh

Thanks for introducing the tabbed layout, it looks amazing. Will get folks to use this across other parts of the codebase as well.

JyotinderSingh avatar Oct 17 '24 12:10 JyotinderSingh

@JyotinderSingh done sir, For HTTP Request have kept it as /GET.

as on the same page it is mentioned we need to use http://your-server-address:port/ So making it more consistent but included full URLs in cURL Commands to make it easier to import in Postman or on terminal.

vanshavenger avatar Oct 17 '24 13:10 vanshavenger

@apoorvyadav1111 done🚀

vanshavenger avatar Oct 17 '24 15:10 vanshavenger