Created
August 28, 2016 03:52
-
-
Save miklb/f3f19867f2afbe0bf3248f85f9414ff5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response = Net::HTTP.post_form(uri, 'target' => "#{target}", 'source' => "#{source}") | |
source = "#{source}" | |
source_slug = source.split('/')[-1] | |
file_ext = '.json' | |
source_file = [source_slug, file_ext].join("") | |
source_path = File.join("_data", source_file) | |
File.write(source_path,response.body) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment