Created
August 27, 2016 11:13
-
-
Save indatawetrust/92162d7dc5571a13c50f7a24eceea2b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# json | |
conn | |
|> put_status(401) | |
|> json(%{err: "authorization error"}) | |
|> halt | |
# text | |
conn | |
|> send_resp(404, "Post not found") | |
|> halt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment