I am trying to do client side HTTP POST using

(require net/url)

(post-pure-port URL post [header]) → input-port?
  URL : url?
  post : bytes?
  header : (listof string?) = null

The following throws no exception but does not seem to do the intended
job (I used Chrome to test the remote URL's get and post. So I am sure
it works on the server side).

(require net/url)

(define (save-remote! data)
  (define URL  (string->url "https://example.com/some-method?";))
  (define DATA (string->bytes/utf-8  (format "key=~a" data)))

  (port-string (post-pure-port URL DATA)))

What am I doing wrong here?

jGc

____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to