[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/graphql-mode 22cb9d4594 071/122: Support customizing the h
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/graphql-mode 22cb9d4594 071/122: Support customizing the headers sent with the request |
Date: |
Sat, 29 Jan 2022 08:03:33 -0500 (EST) |
branch: elpa/graphql-mode
commit 22cb9d4594fe0e2edff605a1ab144aec41a227af
Author: Chris Bowdon <chris.bowdon@polecat.com>
Commit: Chris Bowdon <chris.bowdon@polecat.com>
Support customizing the headers sent with the request
This is to allow for talking to endpoints that speak something other
than JSON and authenticated endpoints.
---
graphql-mode.el | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/graphql-mode.el b/graphql-mode.el
index 38b72275b5..5387c3c9fc 100644
--- a/graphql-mode.el
+++ b/graphql-mode.el
@@ -67,6 +67,12 @@
:type 'file
:group 'graphql)
+(defcustom graphql-headers '(("Content-Type" . "application/json"))
+ "Headers to send to the graphql endpoint."
+ :tag "GraphQL"
+ :type 'list
+ :group 'graphql)
+
(defun graphql-encode-json (query &optional operation variables)
"Put together a json like object with QUERY, OPERATION, and VARIABLES."
(let* ((body '()))
@@ -106,7 +112,7 @@ Please install it and try again."))
url
:type "POST"
:data body
- :headers '(("Content-Type" . "application/json"))
+ :headers graphql-headers
:parser 'json-read
:sync t
:complete (lambda (&rest _)
- [nongnu] branch elpa/graphql-mode created (now 9740e4027b), ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 14bbd1917e 032/122: Update copyright notice, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 12ab2d0eb5 060/122: Merge pull request #13 from timoweave/next, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode de4b2e8117 039/122: Remember graphql-url value only if the query is successful, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode ead2f85e12 047/122: add error handling, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 22cb9d4594 071/122: Support customizing the headers sent with the request,
ELPA Syncer <=
- [nongnu] elpa/graphql-mode 1210279ff4 063/122: Add keywords only completion, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4bb868832f 078/122: Avoid double-encoding variables in JSON, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode a665c9514a 054/122: fix docstring, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 4c87cdab57 018/122: Fix: make the graphql-url buffer-local before the mode is enabled, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 319dfd97d7 011/122: Define graphql-send-query, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode eed3c6ca1c 036/122: Create sample GraphQL server, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 404aa31258 104/122: Save json to graphql-edit-headers, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 16c3d63521 002/122: First commit, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode 5bd8b6273e 003/122: fontify more graphql constructions, ELPA Syncer, 2022/01/29
- [nongnu] elpa/graphql-mode bf0412def0 006/122: Better fontification of type [implements X]?, ELPA Syncer, 2022/01/29