To access a program’s endpoint URL in your code, call:
await
const nodes: {
readonly clock:Clock;
readonly process:Process;
}
Contains the graph references (grefs) that this program has been given access to.
nodes.
process: Process
process.
Process.endpointUrl: Scalar<string>
The URL of the program's HTTP endpoint.
await nodes.process.endpointUrl
endpointUrl
To open an endpoint, click “Open Preview” above the endpoint function
signature. You can also copy a program’s endpoint by right clicking on it in the
Navigator panel.
http program
In Membrane all communication is done via the graph. So how can fetch make network requests? Via a Membrane system program called sys-http, which is available in your workspace by default.
Whenever you use fetch, the request will go through the sys-http program which ultimately
makes the actual request. Be sure to add sys-http as a connection when your program needs to make HTTP requests.