MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / build_region_request

Method build_region_request

src/cloud-api/src/client.rs:73–97  ·  view source on GitHub ↗

Builds a request towards the `Client`'s endpoint The function requires a [CloudProvider] as parameter since it contains the api url (Region API url) to interact with the region. Specify an api_version corresponding to the request/response schema your code will handle. Refer to the Region API docs for schema information.

(
        &self,
        method: Method,
        path: P,
        query: Option<&[(&str, &str)]>,
        cloud_provider: &CloudProvider,
        api_version: Option<u16>,
    )

Source from the content-addressed store, hash-verified

71 /// schema your code will handle. Refer to the Region API docs
72 /// for schema information.
73 async fn build_region_request<P>(
74 &self,
75 method: Method,
76 path: P,
77 query: Option<&[(&str, &str)]>,
78 cloud_provider: &CloudProvider,
79 api_version: Option<u16>,
80 ) -> Result<RequestBuilder, Error>
81 where
82 P: IntoIterator,
83 P::Item: AsRef<str>,
84 {
85 self.build_request(
86 method,
87 path,
88 query,
89 cloud_provider.url.clone(),
90 api_version.and_then(|api_ver| {
91 let mut headers = HeaderMap::with_capacity(1);
92 headers.insert(API_VERSION_HEADER, api_ver.into());
93 Some(headers)
94 }),
95 )
96 .await
97 }
98
99 /// Builds a request towards the `Client`'s endpoint
100 async fn build_request<P>(

Callers 3

get_regionMethod · 0.80
create_regionMethod · 0.80
delete_regionMethod · 0.80

Calls 3

build_requestMethod · 0.45
cloneMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected