Skip to content

Error: undeclared identifier: 'decodeString' #30

@atcol

Description

@atcol

I'm struggling to adapt your tests to a working basic example because I get this error:

presto-0.0.4/presto/route.nim:300:13 Error: undeclared identifier: 'decodeString'

Here's my example:

import presto

proc main() {.async.} =                                                        
   let serverAddress = initTAddress("127.0.0.1:30180")                          
   let router = RestRouter()                                                    
   router.api(MethodGet, "/exchange/{exchange}/orderbook/{symbol}/bid") do (    
     exchange: string, symbol: string                                           
   ) -> RestApiResponse:                                                        
     return RestApiResponse.error(Http505, "\"Some error\"", "application/json")
   var sres = RestServerRef.new(router, serverAddress)                          
   let server = sres.get()                                                      
   server.start()                                                               
                                                                                
 main()                                                                         

I am new to Nim and was hoping to get a basic REST API created with async background tasks providing data (hence the use of Async)

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions