Jose Flores
Munkhjargal Narmandakh
To set up a racket Webserver with API landing points that interpret JSON input, which would then be processed by Racket to evaluated solutions. These solutions would then be returned by the webserver and in JSON form, images would be returned as links.
An image of the form input before a value is retrieved.
An image of the form input after an addition call.
This is my favorite piece of code because it was the hardest part of the puzzle to solve to create the server API that accessed GET variables.
I developed this through the extensive research and having to make a stackoverflow article, having to request external help to solve it.
The explanation of what I was trying to do is in the article.
The code does not use any specific OPL philosophies, except for using what is present and building up from it. I could have written a parser to extract the values I needed but this uses native procedures and structures to achieve the same result.
(define (get-param->string req param)
(if (eq? #f (bindings-assq (string->bytes/utf-8 param)
(request-bindings/raw req)))
""
(bytes->string/utf-8 (binding:form-value (bindings-assq (string->bytes/utf-8 param)
(request-bindings/raw req))))))
Description
MJ code here
git clone https://github.com/oplS15projects/WOLFRACKET.git
cd WOFRACKET/wolfracket/lib/
racket driver.rkt