Issue an HTTP/HTTPS POST command.
(post url data state &key (connect-timeout '10) (read-timeout '10)) → (mv error val state)
In the logic this function reads from the ACL2 oracle. In the
execution we send the http/https POST request to
(htclient::post "https://httpbin.org/post" '(("n" . "3") ("checkpoints" . "((ACL-NUMBERP A))")) state)
Function:
(defun post-fn (url data state connect-timeout read-timeout) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (stringp url) (alistp data) (atom connect-timeout) (atom read-timeout)))) (let ((__function__ 'post)) (declare (ignorable __function__)) (b* ((- (raise "Raw Lisp definition not installed?")) ((mv ?err1 val1 state) (read-acl2-oracle state)) ((mv ?err2 val2 state) (read-acl2-oracle state)) ((when val1) (mv val1 "" state))) (mv nil (acl2::str-fix val2) state))))
Theorem:
(defthm stringp-of-post.val (b* (((mv common-lisp::?error ?val acl2::?state) (post-fn url data state connect-timeout read-timeout))) (stringp val)) :rule-classes :rewrite)
Theorem:
(defthm state-p1-of-post.state (implies (force (state-p1 state)) (b* (((mv common-lisp::?error ?val acl2::?state) (post-fn url data state connect-timeout read-timeout))) (state-p1 state))) :rule-classes :rewrite)