From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: http response: can't read body Date: Mon, 23 Oct 2017 05:29:54 -0700 Message-ID: References: <20171023103632.571d0c36@bother.homenet> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1508761841 17401 195.159.176.226 (23 Oct 2017 12:30:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 23 Oct 2017 12:30:41 +0000 (UTC) Cc: guile-user@gnu.org To: Chris Vine Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Oct 23 14:30:31 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 1e6bs8-000295-TG for guile-user@m.gmane.org; Mon, 23 Oct 2017 14:30:25 +0200 Original-Received: from localhost ([::1]:38542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6bsD-0000WO-2a for guile-user@m.gmane.org; Mon, 23 Oct 2017 08:30:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e6bro-0000Sj-64 for guile-user@gnu.org; Mon, 23 Oct 2017 08:30:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e6bri-0004EN-Gd for guile-user@gnu.org; Mon, 23 Oct 2017 08:30:04 -0400 Original-Received: from mail-pf0-x22e.google.com ([2607:f8b0:400e:c00::22e]:48989) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e6bri-0004Dq-An for guile-user@gnu.org; Mon, 23 Oct 2017 08:29:58 -0400 Original-Received: by mail-pf0-x22e.google.com with SMTP id b79so17015117pfk.5 for ; Mon, 23 Oct 2017 05:29:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6uIe0IOJbGOHXy+VkrpZn89jfSgCE+xZa0nSma5nBM0=; b=CIOXfCJsf3YAOTmw2z8dRiU+vtCdN1V6NQhPpyHiuT/E14VGSiJZsa/3jgy9FyK9cI JrCahMBAPVyRjFZT08rWor/99cIUMiZ/AxDiK2/CPlV1c5DzZAXMNcknG905It7FXD3C oNd9TP847nQcRbNy8vvvtnLZvThVLNjk4PrE2rATDWI2XnToKw35X2d34oJkws7WD0Z5 16ys1RABJTMAgL/RoVfh0/97+nSM1G+uObaOdJXE+5+Pk1X2rf9wns8+r1PlrHDGdsq3 GDR0omOk7jZpTU/52O1cFN2BwPGuAr2vUoQV+061ftXF5E9mUxf3cOjVMvIn4ybY8PVg BLVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=6uIe0IOJbGOHXy+VkrpZn89jfSgCE+xZa0nSma5nBM0=; b=NRMLnP6FVvvtncoW6MFv8WV7yqPs5DVlai0x4YRiEL7IP1zjrt/6blCsLeffvI8Fsj Yti9z/Lrxx4iAfO2vgJTJfbUCVRrMBqYOdlHVi+tiyOi+6jclcD3QHMPMKriN6PGVlaC qB3HfBmAfsZeygW4opdRzROcnj5mIAE8tU5S3K5RzF96v72w4jeUPLh1OvKsAiB8I69s KlrQd9hg5jcoY2gT0TYnHEIuYntS4MrQsl4PowGRd5gzKSvGDhzTMWV1JZI+FKA5qf/S v2JvJz7MQ0FIZZ402YgBQiCj8RkOT3n8/VqTzOjxJDg9Xn61PgIhCGf6lapLl1r8fKRc 4tLQ== X-Gm-Message-State: AMCzsaXMQIYU70c7RIkyKXAuLzcZrqF3vVrOaEZWV4AG6wr8Fx3sQ/1X HolzWJXFXREei/MUNx5QBes= X-Google-Smtp-Source: ABhQp+RWx9BM2t8yMLk+FRYmNN+SDcf0VhTb94L0BKe6f30jhg9SgRuVlxxys9VNNJOFpG/SYKmtsA== X-Received: by 10.98.158.211 with SMTP id f80mr13095212pfk.156.1508761796956; Mon, 23 Oct 2017 05:29:56 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-229-229.championbroadband.com. [216.165.229.229]) by smtp.gmail.com with ESMTPSA id n12sm13301125pfb.149.2017.10.23.05.29.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Oct 2017 05:29:56 -0700 (PDT) In-Reply-To: <20171023103632.571d0c36@bother.homenet> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::22e 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:14222 Archived-At: > On Oct 23, 2017, at 2:36 AM, Chris Vine wrote: > > 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 > Thanks. Second value is a bytevector. -- Matt