Skip to content

Instantly share code, notes, and snippets.

@abaldwin88
Last active February 19, 2019 00:58
Show Gist options
  • Save abaldwin88/8b2612d66a4486d896295d6bbd4948b2 to your computer and use it in GitHub Desktop.
Save abaldwin88/8b2612d66a4486d896295d6bbd4948b2 to your computer and use it in GitHub Desktop.
require 'httparty'
URL = 'http://localhost:3000/posts?search='
def get(search_term)
HTTParty.get(
"#{URL}#{search_term}"
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment