# Author:       Li Junhao   l@x-cmd.com             # xrc
# shellcheck    shell=sh    disable=SC2039,SC3043

# x post json $url ""
# x post json $url
# x post json $url a:b c==d "$(x jo )"


# x post json $url a:b c==d "$(x jo a:b a:d)"

___x_cmd_http_post() {
    param:subcmd ___x_cmd_http_post           \
        json               "post json"          \
        form               "post form"          \
        text               "post text"          \
        bin                "post bin"
    param:subcmd:try
    param:run

    X=POST ___x_cmd_http_request "$@"
}

___x_cmd_http_post_json()(
    param:void
    ___x_cmd_http_header put Content-Type application/json
    X=POST ____x_cmd_http_request_json_body "$@"
)

___x_cmd_http_post_form(){
    param:void
    :
}

___x_cmd_http_post_text(){
    param:void
    :
}


___x_cmd_http_post_bin(){
    param:void
    :
}


