[racket] web server: CRUD put/delete?

From: George Neuner (gneuner2 at comcast.net)
Date: Thu Dec 4 21:56:29 EST 2014

On 12/4/2014 8:26 PM, Jay McCarthy wrote:
> Were you not able to run my example? In the sample you sent, your
> cases for delete and put are commented out.
Those functions were commented out because they would not dispatch properly.

Something is weird.   I had to grab a copy of curl ... I'd never used it 
before ... but both your code and mine work with curl.  At least mine 
dispatched properly to the right function - it didn't work because I 
didn't know how to send a cookie.

However, neither your program nor mine works entirely with straight HTML 
forms or using XHR (ala Dojo).  I tried with Firefox, IE and Chrome.

I wasn't sure how to translate curl's -d <data> into a PUT form, but if 
you set some data using curl, you'll get it back as if a GET was issued 
for both the PUT and DELETE forms.

The XHR result is even weirder but I don't expect you to be able to help 
there.  xhrPut returns "Resource updated" from your program, but the 
data isn't received and whatever data was set is erased. xhrDelete says 
"file not found" with your program.   My program doesn't dispatch 
anything with #:method "put" or #:method "delete" - I get "file not 
found" for both.

So what the heck is happening?
George




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20141204/6d29c657/attachment.html>

Posted on the users mailing list.