Skip to main content

Crate bitwarden_api_base

Crate bitwarden_api_base 

Source
Expand description

§bitwarden-api-base

Base types and utilities for Bitwarden API clients.

§Overview

This crate provides common functionality shared across all Bitwarden API client crates:

  • Configuration - HTTP client configuration with authentication options
  • Error - Error type for API operations
  • ResponseContent - Container for error response data
  • urlencode - URL encoding utility
  • parse_deep_object - Deep object query parameter serialization
  • ContentType - Content type parsing

§Usage

This is an internal crate and should not be used directly. It is re-exported by the API client crates:

  • bitwarden-api-api
  • bitwarden-api-identity

Modules§

configuration 🔒
Configuration types for API clients.
error 🔒
Error types for API operations.
request 🔒
util 🔒
Utility functions for API operations.

Structs§

Configuration
Configuration for an API client.
ResponseContent
Response content from a failed API call.

Enums§

AuthRequired
Marker struct used for endpoints that require authentication. It will be included in the request’s extensions to signal to the middleware that authentication is required.
ContentType
Content types supported by the API client.
Error
Errors that can occur during API operations.

Functions§

parse_deep_object
Parses a deep object (nested JSON) into flat query parameters.
process_with_empty_response
Sends and processes a request expecting an empty response, returning Ok(()) when successful.
process_with_json_response
Sends and processes a request expecting a JSON response, deserializing it into the type T.
urlencode
URL-encodes a string for use in query parameters.