post_apppassword_json_with_headers

Function post_apppassword_json_with_headers 

Source
pub async fn post_apppassword_json_with_headers(
    http_client: &Client,
    app_auth: &AppPasswordAuth,
    url: &str,
    data: Value,
    additional_headers: &HeaderMap,
) -> Result<Value>
Expand description

Performs an app password-authenticated HTTP POST request with JSON body and additional headers, and parses the response as JSON.

§Arguments

  • http_client - The HTTP client to use for the request
  • app_auth - App password authentication credentials
  • url - The URL to request
  • data - The JSON data to send in the request body
  • additional_headers - Additional HTTP headers to include in the request

§Returns

The parsed JSON response as a serde_json::Value

§Errors

Returns ClientError::HttpRequestFailed if the HTTP request fails, or ClientError::JsonParseFailed if JSON parsing fails.