boost::urls::url_view_base::encoded_resource :: Boost Libraries Documentation

# boost::urls::url_view_base::encoded_resource

Return the resource

## Synopsis

Declared in `<boost/url/url_view_base.hpp>`

    pct_string_view
    encoded_resource() const noexcept;

## Description

This function returns the resource, which is the portion of the url that includes only the path, query, and fragment. The returned string may contain percent escapes.

## Example

    assert( url_view( "http://www.example.com/index.html?query#frag" ).encoded_resource() == "/index.html?query#frag" );

## Complexity

Constant.

## Exception Safety

Throws nothing.

## Specification

- 3.3. Path (rfc3986)

- 3.4. Query (rfc3986)

## Return Value

The resource portion of the url.

## See Also

`encoded_origin`, `encoded_target`.

Created with MrDocs