diff --git a/main.rb b/main.rb index 819c69f..8adebb8 100755 --- a/main.rb +++ b/main.rb @@ -13,5 +13,6 @@ get "/deck_xml" do api_url = "https://api2.moxfield.com/v3/decks/all/" + deck_id content = HTTP.headers({"User-Agent" => USER_AGENT, 'Accept' => 'application/json'}).get(api_url) puts content - JSON.parse(content).to_xml(:root => :deck) + xml_data = JSON.parse(content).to_xml(:root => :deck) + [200, {"Content-Type" => "application/xml"}, xml_data] end