Reputation: 357
I know that it's an old question, but I haven't reached to a concise conclusion until now.
I've already made this kind a question before:
https://discourse.corda.net/t/direct-accessing-network-apis-in-flows/915.
So, at this moment, if I wanted to make an HTTP request inside a flow, can I just make it? Or it's restricted in some way?
In case not, how would be a better approach to interact with a legacy system, for example?
Upvotes: 0
Views: 53
Reputation: 23140
It is fine to make HTTP calls from a flow. However, note that as of Corda 3.1, support for HTTP requests in flows is limited:
You can see an example of making an HTTP request in a flow in the Flow HTTP sample here.
An alternative is to query the legacy system outside of the flow, and pass the result of the query in as a flow argument.
Upvotes: 0