From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Roel Janssen Newsgroups: gmane.lisp.guile.user Subject: Questions about the (web client) module. Date: Thu, 20 Jul 2017 12:53:23 +0200 Message-ID: <87o9sfxtuk.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1500548033 18149 195.159.176.226 (20 Jul 2017 10:53:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 20 Jul 2017 10:53:53 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.1.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Jul 20 12:53:50 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dY95Z-0004KQ-RN for guile-user@m.gmane.org; Thu, 20 Jul 2017 12:53:49 +0200 Original-Received: from localhost ([::1]:37243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY95c-0001HH-9y for guile-user@m.gmane.org; Thu, 20 Jul 2017 06:53:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43572) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY95J-0001Cc-16 for guile-user@gnu.org; Thu, 20 Jul 2017 06:53:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dY95F-0000gu-GW for guile-user@gnu.org; Thu, 20 Jul 2017 06:53:33 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:55637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dY95F-0000gm-CR for guile-user@gnu.org; Thu, 20 Jul 2017 06:53:29 -0400 Original-Received: from ip112-245-209-87.adsl2.static.versatel.nl ([87.209.245.112]:57278 helo=antelope) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dY95E-0007d1-Sb for guile-user@gnu.org; Thu, 20 Jul 2017 06:53:29 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:13949 Archived-At: Dear Guilers, When I use http-post, and I want to change the HTTP header called "Content-Type", I seem to need to spell it as "content-type" in the #:headers part of the 'http-post' section. Other headers like "Accept" do not seem to follow the same lowercase style route. More confusingly, using something like: #:headers '((Content-Type . "text/csv")) leads to outputting the "Content-Type" header twice. Why is "content-type" special? Then my next question is about "multipart/form-data" content types. My code looks like this: #:headers `((content-type . ,(string-append "multipart/form-data; boundary=" boundary)) (Accept . "*/*")) But that does not work: scheme@(guile-user)> web/request.scm:184:10: In procedure build-request: web/request.scm:184:10: Bad request: Bad value for header content-type: "multipart/form-data; boundary=..." This is, however, a valid Content-Type. So, why does content-type need to be spelled out lowercased? And why can't it handle "multipart/form-data"? Kind regards, Roel Janssen