Re: Passing a variable/s to a blob for HTTP Call Magic XPA/XPI #ria


Andreas Sedlmeier
 

Hi Darren,

Is that server, where you want to send your data (that Blob) to, controlled by you ? Then you can serialize your variables into that blob using any format you want, a concetenation of name=value pairs or something more verbous and structured (JSON and/or  XML are good candidates, ...). You can do that because you know how to deserialize that on server side then where you receive the content of the blob. A 3'rd party can't - you need to comply with what they expect and can handle.

All  Magic String functions do work on Blobs and you can use a Blob variable as I/O entry and treat it like a file. JSON you could produce with Output Merge or .NET, XML too - or with XML direct access functions, ...

There's also the Magic buffer manipulation functions for putting stuff into a Blob. From those I would however rather stay away. Those are for friends of machine language and assembler programming ^^

When you put character data into your Blob you should use a Blob ANSI and UTF-8 encode all your character data. Binary and Unicode Blobs might result in some encoding issues but you may never experience those resp. have to deal with that stuff.

Andreas

Join main@magicu-l.groups.io to automatically receive all group messages.