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

Sets the payload for a non&hyphen;ok status using a `type&lowbar;url` key, overwriting any existing payload for that `type&lowbar;url`&period;

== Synopsis

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

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

== Description

NOTE&colon; This function does nothing if the Status is ok&period;

== Parameters

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


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