Created
August 4, 2024 20:49
-
-
Save erickgnavar/955820227f475c7d279171fb1005f596 to your computer and use it in GitHub Desktop.
This file contains 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
(defun my/gist-handle-response (response) | |
"Process content of RESPONSE and extract link." | |
(interactive) | |
(let* ((status-line (buffer-substring-no-properties (line-beginning-position) (line-end-position))) | |
(status-code (nth 1 (split-string status-line " ")))) | |
(unless (string-equal status-code "201") | |
(user-error "There was a problem with GitHub API, try again later")) | |
(search-forward "\n\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment