vtx-sdk 0.1.14

Official SDK for developing VTX plugins using Rust and WebAssembly.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Plugin-side HTTP client helpers.

use crate::bindings::vtx::api::{
    vtx_http_client,
    vtx_types::{HttpClientRequest, HttpClientResponse},
};
use crate::error::{VtxError, VtxResult};

pub type Request = HttpClientRequest;
pub type Response = HttpClientResponse;

pub fn request(req: Request) -> VtxResult<Response> {
    vtx_http_client::request(req).map_err(VtxError::from_host_message)
}