Skip to content

Instantly share code, notes, and snippets.

@erickgnavar
Created August 4, 2024 20:49
Show Gist options
  • Save erickgnavar/955820227f475c7d279171fb1005f596 to your computer and use it in GitHub Desktop.
Save erickgnavar/955820227f475c7d279171fb1005f596 to your computer and use it in GitHub Desktop.
(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