---
title: "httpCreateCookie"
canonical: "https://support.appfire.com/space/PSJC/433654478/httpCreateCookie"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Creates an HttpCookie object.

Creates an HttpCookie object.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | httpCreateCookie(name, value) | **Package** | http |
| **Alias** |  | **Pkg Usage** | createCookie(name, value) |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| name | String | Yes | The name of the cookie. |
| value | String | Yes | The value of the cookie. |

## Return Type

**[HttpCookie](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/435028065)**

## Example

```javascript
HttpRequest request;
HttpCookie cookie = httpCreateCookie("sessionId", "298zf09hf012fh2");
request.cookies += cookie;
```

## See also

> Macro (contentbylabel)