## CookieContainer::GetCookieHeader(System::SharedPtr\<Uri\>) method


Return an HTTP header that contains cookies associated with the specified URI.

```cpp
String System::Net::CookieContainer::GetCookieHeader(System::SharedPtr<Uri> uri)
```


| Parameter | Type | Description |
| --- | --- | --- |
| uri | System::SharedPtr\<Uri\> | An URI for which header name will be built. |

### ReturnValue

An HTTP header that contains cookies associated with the specified URI.

## See Also

* Class [String](../../../system/string/)
* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Uri](../../../system/uri/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
## CookieContainer::GetCookieHeader(System::SharedPtr\<Uri\>, String\&) method


Return an HTTP header that contains cookies associated with the specified URI.

```cpp
String System::Net::CookieContainer::GetCookieHeader(System::SharedPtr<Uri> uri, String &optCookie2)
```


| Parameter | Type | Description |
| --- | --- | --- |
| uri | System::SharedPtr\<Uri\> | An URI for which header name will be built. |
| optCookie2 | String\& | The output parameter where a cookie with the maximum supported version will be assigned. |

### ReturnValue

An HTTP header that contains cookies associated with the specified URI.

## See Also

* Class [String](../../../system/string/)
* Typedef [SharedPtr](../../../system/sharedptr/)
* Class [Uri](../../../system/uri/)
* Class [CookieContainer](../)
* Namespace [System::Net](../../)
* Library [Aspose.PDF for C++](../../../)
