http.rb

API POST with array using HTTP gem (or RestClient)

此生再无相见时 提交于 2019-12-02 17:43:40
问题 I'm having trouble with this api and can't seem to get over the hump. Using the HTTP gem (though I'm flexible and can use RestClient if that gets me an answer quicker!). Anyway, I'm having trouble posting an array. everything else is good, I just can't figure out this "itemsarray" in the printaura api found here in the addorder method: PrintAura API I'm running this: def self.submitorder req = HTTP.post("https://api.printaura.com/api.php", :json => { :key => APIKEY, :hash => APIHASH, :method

API POST with array using HTTP gem (or RestClient)

▼魔方 西西 提交于 2019-12-02 07:51:42
I'm having trouble with this api and can't seem to get over the hump. Using the HTTP gem (though I'm flexible and can use RestClient if that gets me an answer quicker!). Anyway, I'm having trouble posting an array. everything else is good, I just can't figure out this "itemsarray" in the printaura api found here in the addorder method: PrintAura API I'm running this: def self.submitorder req = HTTP.post("https://api.printaura.com/api.php", :json => { :key => APIKEY, :hash => APIHASH, :method => "addorder", :businessname => "this is a secret too", :businesscontact => "thats a secret", :email =>