]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/visionect/visionect.factor
http: Use Uppercase For Header Names
[factor.git] / extra / visionect / visionect.factor
index c4e159b2ba88ad8dbdc79e1ceb9be6f182c3aea5..5ae0a01357de8e1d26d67b89583606db9c7b126e 100644 (file)
@@ -29,8 +29,8 @@ SYMBOL: visionect-api-secret
     visionect-api-key get ":" rot 3append ;
 
 : set-visionect-headers ( request -- request )
-    now timestamp>http-string "date" set-header
-    dup visionect-authorization "authorization" set-header ;
+    now timestamp>http-string "Date" set-header
+    dup visionect-authorization "Authorization" set-header ;
 
 : visionect-request ( request -- data )
     set-visionect-headers http-request nip ;
@@ -50,7 +50,7 @@ SYMBOL: visionect-api-secret
 : visionect-post ( post-data path -- data )
     visionect-url <post-request>
     dup post-data>> dup post-data?
-    [ content-type>> "content-type" set-header ] [ drop ] if
+    [ content-type>> "Content-Type" set-header ] [ drop ] if
     visionect-request ;
 
 PRIVATE>