artanis
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: http-request in a controller- is it possible?


From: Mortimer Cladwell
Subject: Re: http-request in a controller- is it possible?
Date: Wed, 9 Dec 2020 09:10:15 -0500

Hi Nala, Jaft,

I am unable to implement your solutions.  The error I get is:

Wrong type (expecting exact integer): #<input-output: string 7ff564d887e0>
HTTP 500
Captured in <artanis/server/ragnarok.scm>
Threw in procedure handle-request :
[REASON] Internal ERROR wrong-type-arg (#f Wrong type (expecting ~A): ~S (exact integer #<input-output: string 7ff564d887e0>) (#<input-output: string 7ff564d887e0>))!
[SERVER ERROR] Internal error from server-side, rendering a 500 page for client ...

For example:

(open-socket-for-uri "https://localhost:3000/123") ==> #<input-output: socket 16>  (Note an integer socket )

(open-socket-for-uri "https://blockchain.info/q/24hrprice") ==> #<input-output: string 7ff564d887e0>  (a string)

(fcntl (open-socket-for-uri "https://blockchain.info/q/24hrprice") F_GETFL 0) ==> Wrong type (expecting exact integer): #<input-output: string 7f171fd8abd0>

Are your solutions supposed to work with non-local URLs?
Thanks
Mortimer

On Mon, Dec 7, 2020 at 2:49 AM Nala Ginrut <mulei@gnu.org> wrote:

Hi Jaft!

Jaft writes:

> The only other major difference I can think of is that the endpoint which is called then calls a function in a module in the lib directory and that function is what makes the http-get call to the other endpoint.

This could be fixed when we provide Ragnarok specific client API.
But anyway, folks may always need to take care when they're using a
non-blocking co-routine based server-core. I think folks may just
realize what Ragnarok it is, we need more time to get used to it. ;-)

Best regards.


--
GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

reply via email to

[Prev in Thread] Current Thread [Next in Thread]