]> gitweb.factorcode.org Git - factor.git/commitdiff
oauth2: use set-header
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 30 Oct 2023 01:37:39 +0000 (20:37 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 30 Oct 2023 01:41:02 +0000 (20:41 -0500)
basis/oauth2/oauth2.factor

index db04aabaf8d7d64224c81d4684401c490728ed66..e2918952fb41e93440008c247acabdce15a1ac45 100644 (file)
@@ -1,6 +1,6 @@
 ! Copyright (C) 2016 Björn Lindqvist.
 ! See https://factorcode.org/license.txt for BSD license.
-USING: accessors assocs calendar combinators http.client io
+USING: accessors assocs calendar combinators http http.client io
 json kernel make math.order sequences unicode urls webbrowser ;
 IN: oauth2
 
@@ -8,7 +8,7 @@ IN: oauth2
     write flush readln [ blank? ] trim [ f ] when-empty ;
 
 : post-json-request ( params token-uri -- assoc )
-    <post-request> dup header>> "application/json" "Accept" rot set-at
+    <post-request> "application/json" "Accept" set-header
     http-request nip json> ;
 
 TUPLE: tokens access refresh expiry ;