s-http-client

API Reference

s-http-client

A Basic HTTP Client

S-HTTP-CLIENT

A Basic HTTP Client
  • Variable *HTTP-CLIENT-AGENT*
    (format nil "http client ~a ~a" (lisp-implementation-type)
            (lisp-implementation-version))
    The value to use for the 'User-Agent' request header
  • Variable *HTTP-CLIENT-ACCEPT*
    "*/*"
    The value to use for the 'Accept' request header
  • Variable *HTTP-CLIENT-ACCEPT-ENCODING*
    nil
    The value to use for the 'Accept-Encoding' request header
  • Class HTTP-CLIENT-STATE
    Object holding all HTTP client state
    DATA
    LOCK   Reader: GET-LOCK
  • Function MAKE-HTTP-CLIENT-STATE
    Make a new HTTP client state object to hold open (keepalive) connections
  • Variable *DEFAULT-HTTP-CLIENT-STATE*
    (s-http-client:make-http-client-state)
    The default, globally shared HTTP client state
  • Function CLOSE-ALL-CONNECTIONS (&optional (http-client-state *default-http-client-state*) &key abort)
    Close all open connections in http-client-state, optionaly aborting them
  • Function DO-HTTP-REQUEST (uri &key (method :get) content content-type content-length body basic-authorization headers proxy (state *default-http-client-state*) connect-timeout read-timeout write-timeout)
    Execute an HTTP request, returns (VALUES body code headers uri kept-alive-state)
  • Function URI-ENCODE-FOR-QUERY (string &key (signal-errors t))
    URI encode string for use as a query parameter value
  • Function URI-DECODE-FOR-QUERY (string)
    URI decode string from a query parameter value