[#absl-StatusBuilder-SetPayload-0000]
= xref:absl.adoc[absl]::xref:absl/StatusBuilder.adoc[StatusBuilder]::SetPayload
:relfileprefix: ../../
:mrdocs:

Adds a payload for the status that will be returned by this StatusBuilder&period;

== Synopsis

Declared in `&lt;absl&sol;status&sol;status&lowbar;builder&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;nodiscard&rsqb;&rsqb;
xref:absl/StatusBuilder.adoc[StatusBuilder]&&
SetPayload(
    std::string&lowbar;view type&lowbar;url,
    xref:absl/Cord.adoc[absl::Cord] payload) &amp;&amp;;
----

== Description

Note that this is equivalent to `Status&colon;&colon;SetPayload`&semi; to attach protos to the MessageSet payload, use `util&colon;&colon;AttachPayload`&period;

== Return Value

`&ast;this` to allow method chaining&period;

[NOTE]
====
The return value https://en.cppreference.com/cpp/language/attributes/nodiscard[should not be discarded^].
====
== Parameters

[cols="1,4"]
|===
| Name| Description
| *type&lowbar;url*
| The type URL identifying the payload&period;
| *payload*
| The payload data to attach&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
