Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme #366

Merged
merged 1 commit into from
Oct 16, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ defmodule GitHub do
public_repos public_gists followers following created_at updated_at
)

def process_url(url) do
def process_request_url(url) do
"https://api.github.com" <> url
end

Expand All @@ -139,8 +139,6 @@ It's possible to extend the functions listed below:
```elixir
def process_request_body(body), do: body

def process_response_body(body), do: body

def process_request_headers(headers) when is_map(headers) do
Enum.into(headers, [])
end
Expand All @@ -149,13 +147,15 @@ def process_request_headers(headers), do: headers

def process_request_options(options), do: options

def process_response_chunk(chunk), do: chunk
def process_request_url(url), do: url

def process_headers(headers), do: headers
def process_response_body(body), do: body

def process_response_chunk(chunk), do: chunk

def process_status_code(status_code), do: status_code
def process_response_headers(headers), do: headers

def process_url(url), do: url
def process_response_status_code(status_code), do: status_code
```

### Async requests
Expand All @@ -176,7 +176,7 @@ iex> flush
**Warning: this option can flood a receiver in messages.**

If a server may send very large messages the `async: :once` option should be used.
This will send only a single chunk at a time the receiver can call `HTTPoison.stream_next/1` to indicate ability to process more chunks.
This will send only a single chunk at a time the receiver can call `HTTPoison.stream_next/1` to indicate ability to process more chunks.

### Cookies

Expand Down