Paste: http post request causes error

Author: qk
Mode: factor
Date: Wed, 16 Jan 2013 08:04:27
Plain Text |
USING: http.client prettyprint urls ;

IN: apps.query-incapsula-visits

: get-post-data ( -- post-data )
    H{
        { "api_id" "***" }
        { "api_key" "***" }
        { "site_id" "***" }
        { "time_range" "custom" }
        { "start" "1356980400000" } ! January 1, 2013 00:00+0500GMT
        { "end" "1358251200000" } ! January 15, 2013 17:00+0500GMT
    } ;

: get-url ( -- url )
    "https://my.incapsula.com/api/visits/v1" >url ;

: query ( -- )
    get-post-data get-url http-post . . ;

MAIN: query

Annotation: error message

Author: qk
Mode: text
Date: Wed, 16 Jan 2013 08:07:50
Plain Text |
Generic word >secure-addr does not define a method for the inet class.
Dispatching on object: T{ inet f "my.incapsula.com" 443 }
(U) Quotation: [ c-to-factor -> ]
    Word: c-to-factor
(U) Quotation: [ [ catchstack* push ] dip call -> catchstack* pop* ]
(O) Word: command-line-startup
(O) Word: run-script
(O) Word: query
(O) Word: http-request
(O) Word: ( gensym )
(O) Word: <request-socket>
(O) Method: M\ object >secure-addr
(O) Word: no-method
(O) Method: M\ object throw
(U) Quotation: [
        OBJ-CURRENT-THREAD special-object error-thread set-global
        current-continuation -> error-continuation set-global
        [ original-error set-global ] [ rethrow ] bi
    ]

New Annotation

Summary:
Author:
Mode:
Body: