diff --git a/app/services/summary_service.rb b/app/services/summary_service.rb new file mode 100644 index 0000000..bff4f9d --- /dev/null +++ b/app/services/summary_service.rb @@ -0,0 +1,14 @@ +class SummaryService + def conn + Faraday.new( + url: 'https://nameless-garden-14218-de5663d17d61.herokuapp.com/', + headers: { 'Content-Type' => 'application/json' } + ) + end + + def summarize + conn.post('api/v1/ping') do |req| + req.body = { link: 'wwww.example.com' }.to_json + end + end +end