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

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

## Description

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

Creates an HttpCookie object.

## Parameters

> Macro (table-plus)
> 
> | 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/PSCONF/pages/15303915)**

## Example

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

## See also

> Macro (contentbylabel)