tentacat
tentacat copied to clipboard
Support for .diff and .patch mediatypes
GitHub API allows to set Accept header to application/vnd.github.v3.diff and application/vnd.github.v3.patch to return raw diffs and patches. This raises error in Tentacat because response body is always processed by JSX.decode!. Even if it is not json
I'm looking to get diffs from tentacat too. @smetana did you find a solution?
We use direct call to HTTPoison.get
def get_diff(url, client) do
headers = [{"Accept", "application/vnd.github.v3.diff"}]
headers = Tentacat.authorization_header(client.auth, headers)
response = HTTPoison.get!(url, headers)
response.body
end