Skip to content
Chris Petersen edited this page Oct 16, 2014 · 1 revision

httpsclient-send sends a u8vector to a https server using a previously established connection. Returns number of characters send.

Parameter Description
buf u8vector of data to send to the server

Example

Example 1: Please see the source of (httpsclient-test host src) for an example.

Example 2: Get front page of www.google.com

(define httpsclient:buf (##still-copy (make-u8vector 1024)))
(if (fx= (httpsclient-open "www.google.com") 1) (begin
  (httpsclient-send (string->u8vector "GET / HTTP/1.0\r\nHost: www.google.com\r\n\r\n"))
  (if (fx> (httpsclient-recv httpsclient:buf) 0)
    (display (u8vector->string httpsclient:buf))(newline))
  (httpsclient-close)
))
Clone this wiki locally