a possibly simpler ToCurl (I know, it does the same thing, but I got confused by the recursive fmt.Sprintf and started looking for edge cases, which seemed an indicator that it was a bit too hard to understand)