# Create a URI

## Basic Usage

@snippet api/mongocxx/examples/uri/basic_usage.cpp Example

## Default Value

@snippet api/mongocxx/examples/uri/default_value.cpp Example

# Query a URI

## User Credentials

@snippet api/mongocxx/examples/uri/userpass.cpp Example

## List of Hosts

@snippet api/mongocxx/examples/uri/hosts.cpp Example

## Optional Options

@snippet api/mongocxx/examples/uri/optional.cpp Example

## All URI Options

@snippet api/mongocxx/examples/uri/all_options.cpp Example

# Error Handling

## Invalid URI

@snippet api/mongocxx/examples/uri/invalid.cpp Example
