diff options
author | pdp8 <pdp8@pdp8.info> | 2023-07-24 02:46:05 +0200 |
---|---|---|
committer | pdp8 <pdp8@pdp8.info> | 2023-07-24 02:46:05 +0200 |
commit | a509c55faca368709044133199f71fb862b1e605 (patch) | |
tree | 9c53d06a4f26e6ccf8635278b8eb56c4a62403f3 /helpers.rb | |
parent | 3c38f81b8a145778d4329c6be4c91baa00ca0d48 (diff) |
html output removed
Diffstat (limited to 'helpers.rb')
-rw-r--r-- | helpers.rb | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -24,6 +24,8 @@ helpers do def save_object(object, box) object = fetch(object) if object.is_a? String and object.match(/^http/) + return unless object + object['@context'] = 'https://www.w3.org/ns/activitystreams' basename = "#{object['published']}_#{mention(object['attributedTo'])}.json" object_rel_path = File.join 'object', object['type'].downcase, basename @@ -71,8 +73,7 @@ helpers do def curl(ext, url) p url - # p "/run/current-system/sw/bin/curl --fail-with-body -sSL #{ext} #{url}" - response = `/run/current-system/sw/bin/curl --fail-with-body -sSL #{ext} #{url}` + response = `/run/current-system/sw/bin/curl -H 'Content-Type: #{CONTENT_TYPE}' -H 'Accept: #{CONTENT_TYPE}' --fail-with-body -sSL #{ext} #{url}` if $CHILD_STATUS.success? response else |