From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Chris Vine Newsgroups: gmane.lisp.guile.user Subject: Re: http response: can't read body Date: Mon, 23 Oct 2017 10:36:32 +0100 Message-ID: <20171023103632.571d0c36@bother.homenet> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1508751440 16187 195.159.176.226 (23 Oct 2017 09:37:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2017 09:37:20 +0000 (UTC) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Oct 23 11:37:16 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 1e6ZAT-0002QF-Px for guile-user@m.gmane.org; Mon, 23 Oct 2017 11:37:10 +0200 Original-Received: from localhost ([::1]:37701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6ZAY-0007M7-1P for guile-user@m.gmane.org; Mon, 23 Oct 2017 05:37:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6Z9y-0007L1-0h for guile-user@gnu.org; Mon, 23 Oct 2017 05:36:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6Z9x-0002n7-9W for guile-user@gnu.org; Mon, 23 Oct 2017 05:36:38 -0400 Original-Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]:53642) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6Z9x-0002mb-32 for guile-user@gnu.org; Mon, 23 Oct 2017 05:36:37 -0400 Original-Received: by mail-wm0-x233.google.com with SMTP id q132so8505661wmd.2 for ; Mon, 23 Oct 2017 02:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=R+fphuoTVDvgmhN3IFUVKtjfc35MterCDgI2+sZvWhg=; b=XB/tvASEunjT4Z8Vk3/nbsv/m+Php+x7/7vNvzmdl/Vcve3TfmXHNAmuAMdhu03qvd 1coEorHbBYT5ONo/J7qi8gThaCW1269p8F+px6Lw8ZtjwlaBqp0tPJDD3q4EobOavHoD kIYJoPL/d58hkSeO5Y6pZm8zZNpSn+7w24w/hkeJtrWpVNuCgIrZHJ7fPXfN5qccIqpP 3vFrGvSL616D2F+X5+cVeVrOgGw5gB7ZEt0xcYAWSIFirC5lHt3bhBRBwsrMrjd/REJG RXQn315zqORnsk0yU4QiciH7/jdGwSOKY1DefCkWbqfEv9Heq5kG1E2NHsDbUMa7QcwI qJjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R+fphuoTVDvgmhN3IFUVKtjfc35MterCDgI2+sZvWhg=; b=Lw2zBKIFzVRNBc1EbevuPYuPGQeWpNyF3Z4Z+B6ior835yyo16TXu4oUtOlRXulIgv ToLEyUKNJxXs1VHUy9yM88kQ4BJq8vOROc9SDVHhE8anVmOQhfKYYWvBUsYMRQg2ipCK M49ubcTU7Tj++A86Px6Sifl80nU459hokxbaKZOQzU7H/0hAJnrVDOlmnnnB2cadYW9K +fbHTkRy9oXQrq3hmjmkKx8Dw0WvMDkngLntVbJBidwU86vL5Isu4/Gwm60JfcX4+kg6 ETYRY38pxwalpF+PaQ1HrmXVzKxImoDEqu72gvwocvV6H/nVJPh+hChYl18L2AuEEs8P hP/A== X-Gm-Message-State: AMCzsaVVMAjHM4wAQygoRj3oQ1W6ioGgwJQHhV4/EcfTAzviG+u8V+gv Sd1IgIFfoNXP9xeMknc+8/QuFg== X-Google-Smtp-Source: ABhQp+RjxDM0BSWe0MSD/hycm9f5KWFL/ztsae8kauSq4QEX1V94e9IBDoeUFeZRlJgVOhGhopsu/w== X-Received: by 10.28.29.215 with SMTP id d206mr4906716wmd.130.1508751394518; Mon, 23 Oct 2017 02:36:34 -0700 (PDT) Original-Received: from bother.homenet ([2002:5f97:b466:10:be2c:81c3:42c4:b467]) by smtp.gmail.com with ESMTPSA id s196sm3241187wmb.6.2017.10.23.02.36.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 02:36:33 -0700 (PDT) Original-Received: from bother.homenet (localhost [127.0.0.1]) by bother.homenet (Postfix) with ESMTP id 4392F26337D for ; Mon, 23 Oct 2017 10:36:32 +0100 (BST) In-Reply-To: X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.31; x86_64-unknown-linux-gnu) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::233 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:14221 Archived-At: On Sun, 22 Oct 2017 15:25:54 -0700 Matt Wette wrote: > I'm using Guile 2.2.2 web api and I can't get the body. > > I'm getting a response from (http-get ). > The (response-code resp) is 200. > The value I get back from (response-body-port resp) says #t for port? > and input-port? > > But if I try to read-char on the port I get: > ERROR: In procedure get-bytevector-n!: > ERROR: In procedure get-bytevector-n!: Wrong type argument in > position 1 (expecting open input port): # > > I get the same error if I use read-response-body. > > What am I doing wrong? > > Matt I have only used http-get in non-streaming mode, but if you are streaming with http-get as I read the documentation you do not use response-body-port - that is for response objects returned by read-response: instead you read the port returned by http-get as its second value . Chris