Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add SSL section

  • Loading branch information...
commit 38050141ff5b26cf8636c90916d68fa5a55ffacb 1 parent 6eec646
@remiprev authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 README.md
View
13 README.md
@@ -437,6 +437,19 @@ Category.all
# GET https://other_api.example.com/categories
```
+## SSL
+
+When initializing `Her::API`, you can pass any parameter supported by `Faraday.new`. So [to use HTTPS](https://github.com/technoweenie/faraday/wiki/Setting-up-SSL-certificates), you can use Faraday’s `:ssl` option.
+
+```ruby
+ssl_options = { :ca_path => "/usr/lib/ssl/certs" }
+Her::API.setup :url => "https://api.example.com", :ssl => ssl_options do |builder|
+ builder.use Faraday::Request::UrlEncoded
+ builder.use Her::Middleware::DefaultParseJSON
+ builder.use Faraday::Adapter::NetHttp
+end
+```
+
## Things to be done
* Better error handling
Please sign in to comment.
Something went wrong with that request. Please try again.