Use PlaceOS::Core::Client.
This will ensure that the interface between cores is consistent and versioned.
|
# TODO: Use `PlaceOS/core-client` for forwarding execute requests |
|
core_uri.path = "/api/core/v1/command/#{remote_module_id}/execute" |
|
response = HTTP::Client.post( |
|
core_uri, |
|
headers: HTTP::Headers{"X-Request-ID" => "int-#{request.reply}-#{remote_module_id}-#{Time.utc.to_unix_ms}"}, |
|
body: request.payload.not_nil!, |
|
) |
Use
PlaceOS::Core::Client.This will ensure that the interface between cores is consistent and versioned.
core/src/placeos-core/process_manager/local.cr
Lines 114 to 120 in b938d43