Hello there.

I have a problem about retrieve JSON values that posted from html form. This is 
part of my code to process POST action.
    
    
    post "/login":
        #do something here
        let usr = parseJson(@"username")
        let psd = parseJson(@"password")
        resp "I Got Data : " & $usr & $psd
    

If I submit my form, i get this feedback
    
    
    An error has occured in one of your routes.
    
    Detail: Traceback (most recent call last)
    webapp.nim(30) webapp
    asyncdispatch.nim(1676) runForever
    asyncdispatch.nim(1089) poll
    asyncdispatch.nim(415) processPendingCallbacks
    asyncdispatch.nim(1291) cb
    asynchttpserver.nim(188) processClientIter
    jester.nim(341) :anonymous
    jester.nim(312) handleHTTPRequest
    asyncdispatch.nim(1304) handleRequest
    asyncdispatch.nim(1291) cb
    jester.nim(273) handleRequestIter
    asyncdispatch.nim(1304) match
    asyncdispatch.nim(1291) cb
    jester.nim(468) matchIter
    json.nim(1150) parseJson
    json.nim(1146) parseJson
    json.nim(1136) parseJson
    json.nim(593) raiseParseErr
    input(1, 3) Error: { expected
    

Can you tell me what I miss?

Thank you.

ps : my NIM version is 0.14.2

Reply via email to