
# 在CodeArts TestPlan接口脚本中调用WSWriteOnly关键字
该关键字适用于访问Websocket服务端进行只写操作。
| 参数               | 是否必选 | 参数类型   | 描述            |
|:---|:---|:---|:---|
| Request Uri      | 是    | String | websocket服务地址 |
| Response Timeout | 是    | Long   | 响应超时时间        |
| Header           | 是    | String | 请求头           |
| Request Type     | 是    | String | 请求数据类型        |
| Request Body     | 是    | String | 请求数据          |
   
#### WSWriteOnly响应
状态：成功
| 参数   | 参数类型   | 描述               |
|:---|:---|:---|
| Body | String | WSWriteOnly接口返回值 |
   
#### WSWriteOnly响应示例
```
{ 
    "Write data to *** at port *** successfully! response: this is a response message." 
 }
```
#### 默认检查点
| 名称 | 预期值 |
|:---|:---|
| 结果 | 成功  |
   
#### WSWriteOnly使用示例
填写参数，访问websocker服务：
![](https://support.huaweicloud.com/usermanual-testman/zh-cn_image_0000001964152629.png "点击放大")
