Share via


UploadOperation.SetRequestHeader(String, String) Method

Definition

Used to set an HTTP request header.

public:
 virtual void SetRequestHeader(Platform::String ^ headerName, Platform::String ^ headerValue) = SetRequestHeader;
void SetRequestHeader(winrt::hstring const& headerName, winrt::hstring const& headerValue);
public void SetRequestHeader(string headerName, string headerValue);
function setRequestHeader(headerName, headerValue)
Public Sub SetRequestHeader (headerName As String, headerValue As String)

Parameters

headerName
String

Platform::String

winrt::hstring

The header name.

headerValue
String

Platform::String

winrt::hstring

The header value.

Windows requirements

Device family
Windows 10, version 2004 (introduced in 10.0.19041.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v10.0)

Remarks

This method allows the caller to set request headers. This method can be called multiple times for the same header. The values will then be concatenated.

Applies to