Currently there is no way to write to a data group (or class) from within an iRule. You can modify it's local copy but there is no way to flush your changes back to the configuration. What happens is that at rule initialization, the data groups are loaded into internal TCL lists at the global scope. At this point it's just a copy of the original data group in TCL form. There are lots of "gotchas" involved with modifying these lists and then flushing them back into the system specifically related to content format changing.
This isn't completely infeasible, but it's just not implemented yet. If you need this ability, I'd recommend you contact product technical support to get it added.
With that said, there are some fun things you could do with iRules and iControl to do what you want. You could build a special iRule that handles the HTTP request for a special URL and returns the content directly to the client with an HTTP::respond. Then your client could use that returned data and plug it into an iControl call to update the data group. Kind of hokey but theoretically it should work. You could get into race conditions if an iRule is updates the global list after the download and before the update of the data group by your iControl application so that's something to test and lookout for.
If you go that route, let us know how it goes...
-Joe