You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into a bit of a roadblock deploying Macros to the endpoints via the putxml API. I'm using PowerShell to read in the contents of a txt file that contains the JS code using Get-Content. When I insert this into the XML body <Command><Macros><Macro><Save><Name>Testing</Name><Overwrite>True</Overwrite><body>$macroBody</body></Save></Macro></Macros></Command> the result is a giant blob of text. When I POST this it ends up as a single line of text on the endpoint... Which is a problem when you have comments in your JavaScript. Anybody know how I can maintain my line breaks in the import file? Probably a PowerShell thing I need to figure out...
Blah... Yeah, it's a PowerShell thing. Instead of deleting my above post, I will include the solution in case it helps anyone else... When you use Get-Content it will strip carriage returns. Instead, use Get-Content -Raw and the carriage returns will be preserved.
$response | ConvertTo-Json
The text was updated successfully, but these errors were encountered:
see post in xAPI devs space
The text was updated successfully, but these errors were encountered: