I'm thinking of using the HTTPGet() function in the following Ampscript of an email...
var @ItemId, @ItemAsset, @ItemAssetCall, @ItemAssetCallStatus set @ItemId = '1234' set @ItemAsset = Concat('http://www.example.com/items/item-',@ItemId,'.png') set @ItemAssetCall = HTTPGet(v(@ItemAsset),true,1,@ItemAssetCallStatus) if @ItemAssetCallStatus < 0 then set @ItemAsset = "http://www.example.com/items/item-default.png" endif
... to see if an image or asset exists on the server (in this case, a png). I am really relying on the CallStatus portion of the function.
I would like to know if there is any downsides to using HTTPGet this way? Is there some scenario I haven't planned for with this set up, in terms of the Ampscript having to wait on the server's response, or the email delaying because it wasn't meant to be used this way, things of that nature.
The reason I'm using this and not something like the Image() Content Ampscript function is I need a bit more control over the image tag.