treeform / puppy

Puppy fetches via HTTP and HTTPS
MIT License
184 stars 27 forks source link

Add `get` and `post` functions akin to python requests module #83

Closed ShyftXero closed 1 year ago

ShyftXero commented 1 year ago

Hey there.

I appreciate the work that's been put in so far by puppy.

I think nimlang forcing you to ship external DLLs for SSL support is kind of whack...

puppy not requiring extra compile time flags is a win too.

I think there is an opportunity for an improved user experience regarding making requests via puppy.

I think having get and post functions would be a good start. Could you implement all the verbs? maybe... but those two are essential.

It would help reduce friction for sending data for newcomers to nm.

I wasn't smart enough to figure out how to have generic headers that can be overridden like in python.

I heard there was an Option[T] but I'm not sure how that works.

guzba commented 1 year ago

Hello and thanks for the suggestion and PR. Sorry we were slow to reply here but in the end I found this to be a good idea and was able to get this into Puppy's latest 2.0 release.

Puppy had changed a bit between when you drafted this PR and today so I did have to implement things in the updated Puppy. In the end what matters is the new and nice API is available.