Crates.io | edgee-sdk |
lib.rs | edgee-sdk |
version | 1.2.0 |
source | src |
created_at | 2024-11-28 12:02:52.914194 |
updated_at | 2024-11-28 12:02:52.914194 |
description | The full-stack edge platform for your edge oriented applications |
homepage | |
repository | https://github.com/edgee-cloud/sdk |
max_upload_size | |
id | 1464274 |
size | 42,929 |
The Edgee SDK Library provides functionality to retrieve and dynamically modify SDK content based on the version specified in the URL. This library includes functions to extract the SDK version from a URL, retrieve the corresponding SDK content, and modify the SDK paths to match the host configuration.
To retrieve the SDK content from a given URL, use the get_sdk_from_url
function. This function takes a URL and a host as arguments and returns the SDK content wrapped in a <script>
tag if successful, or an error message if not.
let url = "https://example.com/sdk/v1.1.0.js";
let host = "example.com";
let sdk_content = get_sdk_from_url(url, host);
assert!(sdk_content.is_ok());
To use this library, add edgee-sdk
as a dependency in your Cargo.toml
:
[dependencies]
edgee-sdk = "1.2.0"