Skip to content

Next level http client for ruby, that utilizes the best practices and underlying technologies in ruby.

Notifications You must be signed in to change notification settings

Chowly/chowly_http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChowHTTP

Instantiate Client

def client
      @client ||= ChowlyHttp::Client.new(
        app: 'My Application',
        base_url: 'https://api.github.com,
        quick: true, # Returns parsed JSON payload instead of full response object.
        debug: true, # Turns on information about request
        timeout: 60, # Timeout for read / write / connect
        common_headers: { # Headers sent with every request sent through client
          'Authorization': "Bearer #{api_key}",
          'Content-Type': 'application/json',
          'Accept': 'application/json'
        },
      )
    end

Use Client

client.post(url: '/v1/repos', body: {ruby: "hash"}, headers: {"X-Request-Header: "123"})

client.get(url: '/v1/repos', params: {username: "chowly"})

Supports post, get, put, patch, delete

About

Next level http client for ruby, that utilizes the best practices and underlying technologies in ruby.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages