Skip to content

Commit

Permalink
feat: service to connect to microservice summary ping endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
noahdurbin committed Aug 30, 2024
1 parent 54f2697 commit b9ab7b6
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions app/services/summary_service.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit b9ab7b6

Please sign in to comment.