1
我正在通過其他客戶端訪問應用程序(SAS for Azure blob)的REST API。如何寫一個xml文件響應到一個rest-client GET文件?
當我這樣做:
response = RestClient.get "RESTURL"
我回去XML。
但是,當我嘗試使用寫響應對象的內容:
marshal_dump = Marshal.dump(response)
file = File.new(file_name,'w')
file.write marshal_dump
file.close
我沒有得到一個乾淨的XML文件。
如何從RestClient.get調用XML輸出並將其寫入.xml文件?