> For the complete documentation index, see [llms.txt](https://boxlang.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://boxlang.ortusbooks.com/boxlang-language/reference/components/net/httpparam.md).

# HTTPParam

I add an HTTP param to an HTTP call.

## Component Signature

```
<bx:HTTPParam type=[string]
name=[string]
value=[any]
file=[string]
encoded=[boolean]
mimetype=[string] />
```

### Attributes

| Atrribute  | Type      | Required | Description                                                                                                                                                                   | Default |
| ---------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| `type`     | `string`  | `true`   | The type of parameter: header, body, xml, cgi, file, url, formfield, cookie                                                                                                   |         |
| `name`     | `string`  | `false`  | The name of the parameter (not required for body, xml, or file types)                                                                                                         |         |
| `value`    | `any`     | `false`  | The value of the parameter (not required for file type)                                                                                                                       |         |
| `file`     | `string`  | `false`  | The path to the file (required for file type)                                                                                                                                 |         |
| `encoded`  | `boolean` | `false`  | Whether the value is URL encoded. Applies to CGI Params and Form Fields (default: false). If passed as false to a URL param, it will bypass the default encoding that occurs. |         |
| `mimetype` | `string`  | `false`  | The MIME type of the file (only used for file type, default: application/octet-stream)                                                                                        |         |

## Examples

### Script Syntax

[Run Example](https://try.boxlang.io/?code=eJwtjEEKwjAQRdfmFMOsdGGzlZbs3CvoBdJ20hYyJqYTo4h3t1JX%2F%2FF5vPZZjyIRmGQMvcHz6XJF6EabZhKDWdz%2BgJCTN%2Fjz5lrrUko1hDB4qrrAGiHRnP0ir4vwVpt2zUabLMPNMhm8I8grLuBCYjeR7xEe1ufl6Rx7bNRHlTQJHTPH7T8Ku0Z9Afh2N4k%3D)

```java
bx:http method="POST" charset="utf-8" url="https://www.google.com/" result="result" {
	bx:httpparam name="q" type="formfield" value="bx";
}
writeDump( result );

```

### BX:HTTP Tag Syntax

```java
<bx:http result="result" method="POST" charset="utf-8" url="https://www.google.com/">
    <bx:httpparam name="q" type="formfield" value="bx">
</bx:http>
<bx:dump var="#result#">
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://boxlang.ortusbooks.com/boxlang-language/reference/components/net/httpparam.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
