# HTTPHeaderService
> HTTP Header管理服务

---

## createHTTPHeader
> 创建Header

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/HTTPHeaderService/createHTTPHeader`
- RPC：`rpc createHTTPHeader (CreateHTTPHeaderRequest) returns (CreateHTTPHeaderResponse);`

**请求对象 (`CreateHTTPHeaderRequest`)**

```json
{
  "name": "string // 名称",
  "value": "string",
  "status": "[]int32",
  "disableRedirect": "bool",
  "shouldAppend": "bool",
  "shouldReplace": "bool",
  "replaceValuesJSON": "bytes",
  "methods": "[]string",
  "domains": "[]string"
}
```

**响应对象 (`CreateHTTPHeaderResponse`)**

```json
{
  "headerId": "int64"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPHeaderService/createHTTPHeader" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## findEnabledHTTPHeaderConfig
> 查找配置

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/HTTPHeaderService/findEnabledHTTPHeaderConfig`
- RPC：`rpc findEnabledHTTPHeaderConfig (FindEnabledHTTPHeaderConfigRequest) returns (FindEnabledHTTPHeaderConfigResponse);`

**请求对象 (`FindEnabledHTTPHeaderConfigRequest`)**

```json
{
  "headerId": "int64"
}
```

**响应对象 (`FindEnabledHTTPHeaderConfigResponse`)**

```json
{
  "headerJSON": "bytes"
}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPHeaderService/findEnabledHTTPHeaderConfig" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---

## updateHTTPHeader
> 修改Header

- 角色：`admin`, `user`
- HTTP：`POST https://backend.dooki.cloud/HTTPHeaderService/updateHTTPHeader`
- RPC：`rpc updateHTTPHeader (UpdateHTTPHeaderRequest) returns (RPCSuccess);`

**请求对象 (`UpdateHTTPHeaderRequest`)**

```json
{
  "headerId": "int64",
  "name": "string // 名称",
  "value": "string",
  "status": "[]int32",
  "disableRedirect": "bool",
  "shouldAppend": "bool",
  "shouldReplace": "bool",
  "replaceValuesJSON": "bytes",
  "methods": "[]string",
  "domains": "[]string"
}
```

**响应对象 (`RPCSuccess`)**

```json
{}
```

**调用示例**

```bash
curl -X POST "https://backend.dooki.cloud/HTTPHeaderService/updateHTTPHeader" \
  -H "Content-Type: application/json" \
  -H "X-Edge-Access-Token: <YOUR_TOKEN>" \
  -d '{
    ...
  }'
```

---
