You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of my code that uses this stuff was written at my former employer, but I think call syntax is supposed to closely follow the HTTP method arguments as in the following:
let query =%* { "delimiter": "/", "max-keys": 1000 }
let path =%* { "Bucket": "some-bucket" }
# create the recallablelet recall = listObjectsV2.call(query = query, path = path)
# issue the call and close the fdlet reply = recall.issueAndClose()
if reply.code.is2xx:
var stream =newStringStream reply.body
let xml =parseXml stream
let contents = xml.findAll"Contents"# ...else:
raiseKeyError.newException reply.uncompressed
This probably looks really verbose to you, but realize that these APIs are all wrappers generated from the OpenAPI specifications; the verbosity of the generated API can be really critical to allowing the user to hack together any crazy combination of input validators, service url transmogrification, response processors, threaded clients, mocked calls, and so on. It's really designed to be the layer beneath the API that you write for "normal" use.
I am now using version 2626.5.2 with the latest fixes.
Trying to list the contents of an S3 bucket.
After looking at the example in the
README
and looking at the code ins3_20060301.nim
, this was my best attempt:Output:
This probably is user error. I don't know enough Nim yet to be able to debug further. e.g.
echo rs.headers
doesn't compile.Any tips on where to look next, would be appreciated!
The text was updated successfully, but these errors were encountered: