:relfileprefix: ../../
[#boost-urls-operator_lshift-0c]

== xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::operator<<


Format the url to the output stream


=== Synopsis

Declared in header `<https://www.github.com/boostorg/url/blob/develop/include/boost/url/url_view_base.hpp#L2723[boost/url/url_view_base.hpp,window=blank_]>`

[source,cpp,subs="verbatim,macros,-callouts"]
----
std::ostream&
operator<<(
    std::ostream& os,
    xref:boost/urls/url_view_base.adoc[url_view_base] const& u);
----

=== Description


This function serializes the url to
the specified output stream. Any
percent-escapes are emitted as-is;
no decoding is performed.
[,cpp]
----
url_view u( "http://www.example.com/index.htm" );
std::stringstream ss;
ss << u;
assert( ss.str() == "http://www.example.com/index.htm" );
----
[,cpp]
----
return os << u.buffer();
----

=== Linear in `u.buffer().size()`

=== Basic guarantee.

Format the url to the output stream

This function serializes the url to
the specified output stream. Any
percent-escapes are emitted as-is;
no decoding is performed.
[,cpp]
----
url_view u( "http://www.example.com/index.htm" );
std::stringstream ss;
ss << u;
assert( ss.str() == "http://www.example.com/index.htm" );
----
[,cpp]
----
return os << u.buffer();
----

=== Linear in `u.buffer().size()`

=== Basic guarantee.




=== Return Value


A reference to the output stream, for chaining



=== Parameters

|===
| Name | Description 

| *os*
| 
The output stream to write to.

| *u*
| 
The url to write.

| *os*
| 
The output stream to write to.

| *u*
| 
The url to write.

|===




