Open eladcon opened 9 months ago
Technically, url
is a preflight field - but since preflight fields are transparently lifted and accessible from inflight in Wing, it seems reasonable for the example to work.
From an implementation side, the issue is that accessing any property or method of a resource involves making an HTTP request to the simulator server, which means an async call. Which means this might not be possible. But perhaps we could change getResource
to be an async method. Then, during the getResource
async call we could fetch and cache all preflight fields so that they can be accessed on the client via a (synchronous) getter.
Hi,
This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!
I tried this:
given this wing file:
i tried accessing the
cloud.Api
'surl
property through the simulator js API:This happened:
the following log:
[AsyncFunction (anonymous)]
I expected this:
printing the
api.url
urlIs there a workaround?
No response
Component
SDK
Wing Version
No response
Node.js Version
No response
Platform(s)
No response
Anything else?
No response
Community Notes