I used the built-in url package (http://docs.racket-lang.org/net/url.html) from Racket to fetch data from Wunderground weather API and it was simple enough that I did not feel the need for a separate REST library. I just used `format` to construct the URL, `get-pure-port` to fetch the data and `read-json` to parse it. The API that I used has an API KEY and only GET requests, so no login is required, however looking at the URL package, there are functions for POST requests and you can pass headers as well.
If you want to look at my code, it is linked below, but the majority of that file deals with weather data management and only a tiny part is actually related to fetching data from the weather server: https://github.com/alex-hhh/ActivityLog2/blob/master/rkt/weather.rkt#L239 Best Regards, Alex. On Thursday, April 12, 2018 at 2:36:50 AM UTC+8, Paulo Matos wrote: > > Hi, > > I am interested in developing a Racket wrapper for hetzner cloud rest > api. This is a REST API defined in: > https://docs.hetzner.cloud/ > > I however, have no experience with accessing REST APIs in racket much > less developing one. > > 1. Are there any examples out there of wrapping rest apis in racket? > 2. If you look at how this is done in Python as expected everything > is an object. However, from what I generally see, libraries seem to > rarely touch the racket object system (although I think it's great). So, > I guess instead of having an object 'Client' to which you would do (send > client login "username" "password"), is it generally preferable to have > a (make-client ...), which you would follow with (client-login > "username" "password")? > > Any thoughts would be appreciated before I commit myself, only to find > it goes against the racket way once I publish it. :) > >  https://github.com/elsyms/hetznercloud-py/ > -- > Paulo Matos > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.