Yes vars_post should work, and it's the preferred way to do it indeed.

You should have into account which vars_post will be automatically uri encoded, because of this maybe you want to try:

```
"ping_size" => "&#{cmd}&",
```

In this way you avoid double uri encoding, which I guess could be the cause of issues.

On the other hand, you can disable the automatic uri encoding when using vars_posts with the encode_params option:

```ruby
'encode_params' => false,
'vars_posts' => { ... }
```