Skip to content
/ httpet Public

HTTP adapter for Elixir to communicate with Petlove ecosystem's applications

Notifications You must be signed in to change notification settings

petlove/httpet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTPet

HTTP client to do calls between services inside the Petlove's ecosystem.

Installation

Inside your deps on mix.exs:

  {:httpet, git: "[email protected]:petlove/HTTPet.git"},

Configuration

config :httpet, :tracer, MyApp.Tracer

config :httpet, :hosts,
  my_internal_service: System.get_env("INTERNAL_SERVICE_URL")

Usage

HTTPet.get(:my_internal_service, "/users/me")

HTTPet.get(:my_internal_service, "/users/me", %{"my-custom-header" => "my-custom-value"})

HTTPet.put(:my_internal_service, "/users/me", %{name: "my user name"})

HTTPet.put(:my_internal_host, "/users/me", %{name: "my user name"}, %{"my-custom-header" => "my-custom-value"})

HTTPet.post("http://petlove.com.br", "/users/me", %{name: "my user name"}, %{"my-custom-header" => "my-custom-value"})

About

HTTP adapter for Elixir to communicate with Petlove ecosystem's applications

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages