@scalar/snippetz 0.5.5 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clients/index.js +5 -5
- package/dist/clients/index.js.map +1 -1
- package/dist/httpsnippet-lite/helpers/code-builder.d.ts +51 -0
- package/dist/httpsnippet-lite/helpers/code-builder.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/code-builder.js +29 -0
- package/dist/httpsnippet-lite/helpers/code-builder.js.map +7 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.d.ts +22 -3
- package/dist/httpsnippet-lite/helpers/escape.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/escape.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/headers.d.ts +15 -0
- package/dist/httpsnippet-lite/helpers/headers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/headers.js +2 -13
- package/dist/httpsnippet-lite/helpers/headers.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/reducer.d.ts +2 -0
- package/dist/httpsnippet-lite/helpers/reducer.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/reducer.js +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.d.ts +2 -2
- package/dist/httpsnippet-lite/helpers/shell.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.js +4 -4
- package/dist/httpsnippet-lite/helpers/shell.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.d.ts +33 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.js +1 -0
- package/dist/httpsnippet-lite/helpers/url.d.ts +4 -0
- package/dist/httpsnippet-lite/helpers/url.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/url.js +9 -0
- package/dist/httpsnippet-lite/helpers/url.js.map +7 -0
- package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/c/libcurl/client.js +7 -13
- package/dist/httpsnippet-lite/targets/c/libcurl/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/clojure/clj_http/client.js +7 -3
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/csharp/restsharp/client.js +8 -18
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/go/native/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/go/native/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/go/native/client.js +14 -35
- package/dist/httpsnippet-lite/targets/go/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/asynchttp/client.js +1 -4
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/nethttp/client.js +3 -6
- package/dist/httpsnippet-lite/targets/java/nethttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/okhttp/client.js +5 -8
- package/dist/httpsnippet-lite/targets/java/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/unirest/client.js +4 -8
- package/dist/httpsnippet-lite/targets/java/unirest/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/axios/client.js +6 -10
- package/dist/httpsnippet-lite/targets/javascript/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/jquery/client.js +5 -11
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/xhr/client.js +7 -15
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/kotlin/okhttp/client.js +6 -9
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/node/axios/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/node/axios/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/node/axios/client.js +3 -5
- package/dist/httpsnippet-lite/targets/node/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.d.ts +5 -11
- package/dist/httpsnippet-lite/targets/objc/helpers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.js +7 -10
- package/dist/httpsnippet-lite/targets/objc/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/nsurlsession/client.js +14 -51
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/ocaml/cohttp/client.js +3 -5
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/common.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/common.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/common.js +6 -12
- package/dist/httpsnippet-lite/targets/powershell/common.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/python/python3/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/python/python3/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/python/python3/client.js +4 -8
- package/dist/httpsnippet-lite/targets/python/python3/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/r/httr/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/r/httr/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/r/httr/client.js +5 -12
- package/dist/httpsnippet-lite/targets/r/httr/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/ruby/native/client.js +2 -2
- package/dist/httpsnippet-lite/targets/ruby/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/shell/httpie/client.js +11 -11
- package/dist/httpsnippet-lite/targets/shell/httpie/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/shell/wget/client.js +6 -6
- package/dist/httpsnippet-lite/targets/shell/wget/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/swift/helpers.d.ts +15 -0
- package/dist/httpsnippet-lite/targets/swift/helpers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/swift/helpers.js +9 -16
- package/dist/httpsnippet-lite/targets/swift/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/swift/nsurlsession/client.js +11 -32
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/target.d.ts +19 -0
- package/dist/httpsnippet-lite/targets/target.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/target.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +2 -2
- package/dist/plugins/c/libcurl/index.d.ts +1 -1
- package/dist/plugins/c/libcurl/index.d.ts.map +1 -1
- package/dist/plugins/c/libcurl/index.js +4 -1
- package/dist/plugins/c/libcurl/index.js.map +2 -2
- package/dist/plugins/c/libcurl/libcurl.js +1 -1
- package/dist/plugins/c/libcurl/libcurl.js.map +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.d.ts.map +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.js +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.js.map +2 -2
- package/dist/plugins/clojure/clj_http/index.d.ts +1 -1
- package/dist/plugins/clojure/clj_http/index.d.ts.map +1 -1
- package/dist/plugins/clojure/clj_http/index.js +4 -1
- package/dist/plugins/clojure/clj_http/index.js.map +2 -2
- package/dist/plugins/csharp/httpclient/index.d.ts +1 -1
- package/dist/plugins/csharp/httpclient/index.d.ts.map +1 -1
- package/dist/plugins/csharp/httpclient/index.js +4 -1
- package/dist/plugins/csharp/httpclient/index.js.map +2 -2
- package/dist/plugins/csharp/restsharp/index.d.ts +1 -1
- package/dist/plugins/csharp/restsharp/index.d.ts.map +1 -1
- package/dist/plugins/csharp/restsharp/index.js +4 -1
- package/dist/plugins/csharp/restsharp/index.js.map +2 -2
- package/dist/plugins/csharp/restsharp/restsharp.d.ts.map +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.js +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.js.map +2 -2
- package/dist/plugins/dart/http/index.d.ts +1 -1
- package/dist/plugins/dart/http/index.d.ts.map +1 -1
- package/dist/plugins/dart/http/index.js +4 -1
- package/dist/plugins/dart/http/index.js.map +2 -2
- package/dist/plugins/fsharp/httpclient/index.d.ts +1 -1
- package/dist/plugins/fsharp/httpclient/index.d.ts.map +1 -1
- package/dist/plugins/fsharp/httpclient/index.js +4 -1
- package/dist/plugins/fsharp/httpclient/index.js.map +2 -2
- package/dist/plugins/go/native/index.d.ts +1 -1
- package/dist/plugins/go/native/index.d.ts.map +1 -1
- package/dist/plugins/go/native/index.js +4 -1
- package/dist/plugins/go/native/index.js.map +2 -2
- package/dist/plugins/go/native/native.d.ts.map +1 -1
- package/dist/plugins/go/native/native.js +1 -1
- package/dist/plugins/go/native/native.js.map +2 -2
- package/dist/plugins/http/http11/index.d.ts +1 -1
- package/dist/plugins/http/http11/index.d.ts.map +1 -1
- package/dist/plugins/http/http11/index.js +4 -1
- package/dist/plugins/http/http11/index.js.map +2 -2
- package/dist/plugins/java/asynchttp/asynchttp.d.ts.map +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.js +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.js.map +2 -2
- package/dist/plugins/java/asynchttp/index.d.ts +1 -1
- package/dist/plugins/java/asynchttp/index.d.ts.map +1 -1
- package/dist/plugins/java/asynchttp/index.js +4 -1
- package/dist/plugins/java/asynchttp/index.js.map +2 -2
- package/dist/plugins/java/nethttp/index.d.ts +1 -1
- package/dist/plugins/java/nethttp/index.d.ts.map +1 -1
- package/dist/plugins/java/nethttp/index.js +4 -1
- package/dist/plugins/java/nethttp/index.js.map +2 -2
- package/dist/plugins/java/nethttp/nethttp.d.ts.map +1 -1
- package/dist/plugins/java/nethttp/nethttp.js +1 -1
- package/dist/plugins/java/nethttp/nethttp.js.map +2 -2
- package/dist/plugins/java/okhttp/index.d.ts +1 -1
- package/dist/plugins/java/okhttp/index.d.ts.map +1 -1
- package/dist/plugins/java/okhttp/index.js +4 -1
- package/dist/plugins/java/okhttp/index.js.map +2 -2
- package/dist/plugins/java/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/java/okhttp/okhttp.js +1 -1
- package/dist/plugins/java/okhttp/okhttp.js.map +2 -2
- package/dist/plugins/java/unirest/index.d.ts +1 -1
- package/dist/plugins/java/unirest/index.d.ts.map +1 -1
- package/dist/plugins/java/unirest/index.js +4 -1
- package/dist/plugins/java/unirest/index.js.map +2 -2
- package/dist/plugins/java/unirest/unirest.d.ts.map +1 -1
- package/dist/plugins/java/unirest/unirest.js +1 -1
- package/dist/plugins/java/unirest/unirest.js.map +2 -2
- package/dist/plugins/js/axios/axios.js +1 -1
- package/dist/plugins/js/axios/axios.js.map +1 -1
- package/dist/plugins/js/fetch/fetch.js +1 -1
- package/dist/plugins/js/fetch/fetch.js.map +2 -2
- package/dist/plugins/js/jquery/index.d.ts +1 -1
- package/dist/plugins/js/jquery/index.d.ts.map +1 -1
- package/dist/plugins/js/jquery/index.js +4 -1
- package/dist/plugins/js/jquery/index.js.map +2 -2
- package/dist/plugins/js/jquery/jquery.d.ts.map +1 -1
- package/dist/plugins/js/jquery/jquery.js +1 -1
- package/dist/plugins/js/jquery/jquery.js.map +2 -2
- package/dist/plugins/js/ofetch/index.d.ts +1 -1
- package/dist/plugins/js/ofetch/index.d.ts.map +1 -1
- package/dist/plugins/js/ofetch/index.js +4 -1
- package/dist/plugins/js/ofetch/index.js.map +2 -2
- package/dist/plugins/js/xhr/index.d.ts +1 -1
- package/dist/plugins/js/xhr/index.d.ts.map +1 -1
- package/dist/plugins/js/xhr/index.js +4 -1
- package/dist/plugins/js/xhr/index.js.map +2 -2
- package/dist/plugins/js/xhr/xhr.d.ts.map +1 -1
- package/dist/plugins/js/xhr/xhr.js +1 -1
- package/dist/plugins/js/xhr/xhr.js.map +2 -2
- package/dist/plugins/kotlin/okhttp/index.d.ts +1 -1
- package/dist/plugins/kotlin/okhttp/index.d.ts.map +1 -1
- package/dist/plugins/kotlin/okhttp/index.js +4 -1
- package/dist/plugins/kotlin/okhttp/index.js.map +2 -2
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.js +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.js.map +2 -2
- package/dist/plugins/node/axios/axios.js +1 -1
- package/dist/plugins/node/axios/axios.js.map +1 -1
- package/dist/plugins/node/axios/index.d.ts +1 -1
- package/dist/plugins/node/axios/index.d.ts.map +1 -1
- package/dist/plugins/node/axios/index.js +4 -1
- package/dist/plugins/node/axios/index.js.map +2 -2
- package/dist/plugins/node/fetch/fetch.js +1 -1
- package/dist/plugins/node/fetch/fetch.js.map +2 -2
- package/dist/plugins/node/fetch/index.d.ts +1 -1
- package/dist/plugins/node/fetch/index.d.ts.map +1 -1
- package/dist/plugins/node/fetch/index.js +4 -1
- package/dist/plugins/node/fetch/index.js.map +2 -2
- package/dist/plugins/node/ofetch/index.d.ts +1 -1
- package/dist/plugins/node/ofetch/index.d.ts.map +1 -1
- package/dist/plugins/node/ofetch/index.js +4 -1
- package/dist/plugins/node/ofetch/index.js.map +2 -2
- package/dist/plugins/node/undici/index.d.ts +1 -1
- package/dist/plugins/node/undici/index.d.ts.map +1 -1
- package/dist/plugins/node/undici/index.js +4 -1
- package/dist/plugins/node/undici/index.js.map +2 -2
- package/dist/plugins/node/undici/undici.js +1 -1
- package/dist/plugins/node/undici/undici.js.map +2 -2
- package/dist/plugins/objc/nsurlsession/index.d.ts +1 -1
- package/dist/plugins/objc/nsurlsession/index.d.ts.map +1 -1
- package/dist/plugins/objc/nsurlsession/index.js +4 -1
- package/dist/plugins/objc/nsurlsession/index.js.map +2 -2
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.js +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.js.map +2 -2
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts.map +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.js +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.js.map +2 -2
- package/dist/plugins/ocaml/cohttp/index.d.ts +1 -1
- package/dist/plugins/ocaml/cohttp/index.d.ts.map +1 -1
- package/dist/plugins/ocaml/cohttp/index.js +4 -1
- package/dist/plugins/ocaml/cohttp/index.js.map +2 -2
- package/dist/plugins/php/curl/index.d.ts +1 -1
- package/dist/plugins/php/curl/index.d.ts.map +1 -1
- package/dist/plugins/php/curl/index.js +4 -1
- package/dist/plugins/php/curl/index.js.map +2 -2
- package/dist/plugins/php/guzzle/index.d.ts +1 -1
- package/dist/plugins/php/guzzle/index.d.ts.map +1 -1
- package/dist/plugins/php/guzzle/index.js +4 -1
- package/dist/plugins/php/guzzle/index.js.map +2 -2
- package/dist/plugins/powershell/restmethod/index.d.ts +1 -1
- package/dist/plugins/powershell/restmethod/index.d.ts.map +1 -1
- package/dist/plugins/powershell/restmethod/index.js +4 -1
- package/dist/plugins/powershell/restmethod/index.js.map +2 -2
- package/dist/plugins/powershell/restmethod/restmethod.d.ts.map +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.js +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.js.map +2 -2
- package/dist/plugins/powershell/webrequest/index.d.ts +1 -1
- package/dist/plugins/powershell/webrequest/index.d.ts.map +1 -1
- package/dist/plugins/powershell/webrequest/index.js +4 -1
- package/dist/plugins/powershell/webrequest/index.js.map +2 -2
- package/dist/plugins/powershell/webrequest/webrequest.d.ts.map +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.js +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.js.map +2 -2
- package/dist/plugins/python/httpx/async.d.ts.map +1 -1
- package/dist/plugins/python/httpx/async.js.map +2 -2
- package/dist/plugins/python/httpx/index.d.ts +2 -2
- package/dist/plugins/python/httpx/index.d.ts.map +1 -1
- package/dist/plugins/python/httpx/index.js +6 -2
- package/dist/plugins/python/httpx/index.js.map +2 -2
- package/dist/plugins/python/httpx/sync.d.ts.map +1 -1
- package/dist/plugins/python/httpx/sync.js.map +2 -2
- package/dist/plugins/python/python3/index.d.ts +1 -1
- package/dist/plugins/python/python3/index.d.ts.map +1 -1
- package/dist/plugins/python/python3/index.js +4 -1
- package/dist/plugins/python/python3/index.js.map +2 -2
- package/dist/plugins/python/python3/python3.d.ts.map +1 -1
- package/dist/plugins/python/python3/python3.js +1 -1
- package/dist/plugins/python/python3/python3.js.map +2 -2
- package/dist/plugins/python/requests/index.d.ts +1 -1
- package/dist/plugins/python/requests/index.d.ts.map +1 -1
- package/dist/plugins/python/requests/index.js +4 -1
- package/dist/plugins/python/requests/index.js.map +2 -2
- package/dist/plugins/python/requests/requests.d.ts.map +1 -1
- package/dist/plugins/python/requests/requests.js.map +2 -2
- package/dist/plugins/r/httr/httr.d.ts.map +1 -1
- package/dist/plugins/r/httr/httr.js +1 -1
- package/dist/plugins/r/httr/httr.js.map +2 -2
- package/dist/plugins/r/httr/index.d.ts +1 -1
- package/dist/plugins/r/httr/index.d.ts.map +1 -1
- package/dist/plugins/r/httr/index.js +4 -1
- package/dist/plugins/r/httr/index.js.map +2 -2
- package/dist/plugins/ruby/native/index.d.ts +1 -1
- package/dist/plugins/ruby/native/index.d.ts.map +1 -1
- package/dist/plugins/ruby/native/index.js +4 -1
- package/dist/plugins/ruby/native/index.js.map +2 -2
- package/dist/plugins/ruby/native/native.d.ts.map +1 -1
- package/dist/plugins/ruby/native/native.js +1 -1
- package/dist/plugins/ruby/native/native.js.map +2 -2
- package/dist/plugins/rust/reqwest/index.d.ts +1 -1
- package/dist/plugins/rust/reqwest/index.d.ts.map +1 -1
- package/dist/plugins/rust/reqwest/index.js +4 -1
- package/dist/plugins/rust/reqwest/index.js.map +2 -2
- package/dist/plugins/shell/curl/index.d.ts +1 -1
- package/dist/plugins/shell/curl/index.d.ts.map +1 -1
- package/dist/plugins/shell/curl/index.js +4 -1
- package/dist/plugins/shell/curl/index.js.map +2 -2
- package/dist/plugins/shell/httpie/httpie.d.ts.map +1 -1
- package/dist/plugins/shell/httpie/httpie.js +1 -1
- package/dist/plugins/shell/httpie/httpie.js.map +2 -2
- package/dist/plugins/shell/httpie/index.d.ts +1 -1
- package/dist/plugins/shell/httpie/index.d.ts.map +1 -1
- package/dist/plugins/shell/httpie/index.js +4 -1
- package/dist/plugins/shell/httpie/index.js.map +2 -2
- package/dist/plugins/shell/wget/index.d.ts +1 -1
- package/dist/plugins/shell/wget/index.d.ts.map +1 -1
- package/dist/plugins/shell/wget/index.js +4 -1
- package/dist/plugins/shell/wget/index.js.map +2 -2
- package/dist/plugins/shell/wget/wget.d.ts.map +1 -1
- package/dist/plugins/shell/wget/wget.js +1 -1
- package/dist/plugins/shell/wget/wget.js.map +2 -2
- package/dist/plugins/swift/nsurlsession/index.d.ts +1 -1
- package/dist/plugins/swift/nsurlsession/index.d.ts.map +1 -1
- package/dist/plugins/swift/nsurlsession/index.js +4 -1
- package/dist/plugins/swift/nsurlsession/index.js.map +2 -2
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.js +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.js.map +2 -2
- package/dist/snippetz.d.ts +2 -2
- package/dist/snippetz.d.ts.map +1 -1
- package/dist/snippetz.js.map +2 -2
- package/dist/utils/convertWithHttpSnippetLite.js +1 -1
- package/dist/utils/convertWithHttpSnippetLite.js.map +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -1
- package/dist/utils/index.js.map +2 -2
- package/package.json +4 -3
- package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts +0 -8
- package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/code-builder.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/escape.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/escape.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/form-data.js +0 -59
- package/dist/httpsnippet-lite/esm/helpers/form-data.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/headers.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/helpers/headers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/headers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts +0 -2
- package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/reducer.js +0 -20
- package/dist/httpsnippet-lite/esm/helpers/reducer.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/shell.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/shell.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/url.d.ts +0 -5
- package/dist/httpsnippet-lite/esm/helpers/url.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/url.js +0 -20
- package/dist/httpsnippet-lite/esm/helpers/url.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/utils.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/helpers/utils.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/utils.js +0 -16
- package/dist/httpsnippet-lite/esm/helpers/utils.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/c/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/c/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/c/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/c/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts +0 -27
- package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/go/native/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/go/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/go/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/go/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/go/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/target.d.ts +0 -67
- package/dist/httpsnippet-lite/esm/targets/java/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/java/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts +0 -55
- package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js +0 -100
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/node/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/target.js +0 -24
- package/dist/httpsnippet-lite/esm/targets/node/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/objc/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js +0 -72
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js +0 -85
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js +0 -127
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/php/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/php/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts +0 -10
- package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/common.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts +0 -9
- package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js +0 -68
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts +0 -19
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/target.d.ts +0 -29
- package/dist/httpsnippet-lite/esm/targets/python/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/python/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/r/target.d.ts +0 -27
- package/dist/httpsnippet-lite/esm/targets/r/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/r/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/r/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts +0 -42
- package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/target.js +0 -20
- package/dist/httpsnippet-lite/esm/targets/shell/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/swift/target.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/code-builder.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/escape.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js +0 -28
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/headers.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/shell.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/shell.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/url.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/url.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/utils.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/utils.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/httpsnippet.d.js +0 -19
- package/dist/httpsnippet-lite/types/httpsnippet.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/c/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/c/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/go/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/go/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/http/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/http/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/r/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/r/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/targets.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/targets.d.js.map +0 -7
- /package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.js +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/code-builder.d.js.map → helpers/reducer.js.map} +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/escape.d.js.map → helpers/snippet-request.js.map} +0 -0
- /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/restmethod/client.js +0 -0
- /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/webrequest/client.js +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/headers.d.js.map → targets/target.js.map} +0 -0
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const c: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
libcurl: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ method, fullUrl, headersObj, allHeaders, postData }: {
|
|
17
|
-
method: any;
|
|
18
|
-
fullUrl: any;
|
|
19
|
-
headersObj: any;
|
|
20
|
-
allHeaders: any;
|
|
21
|
-
postData: any;
|
|
22
|
-
}) => any;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/c/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CAUb,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/c/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { libcurl } from './libcurl/client.js'\n\nexport const c = {\n info: {\n key: 'c',\n title: 'C',\n extname: '.c',\n default: 'libcurl',\n },\n clientsById: {\n libcurl,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,eAAe;AAEjB,MAAM,IAAI;AAAA,EACf,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const clj_http: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ queryObj, method, postData, url, allHeaders }: {
|
|
9
|
-
queryObj: any;
|
|
10
|
-
method: any;
|
|
11
|
-
postData: any;
|
|
12
|
-
url: any;
|
|
13
|
-
allHeaders: any;
|
|
14
|
-
}, options: any) => any;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/clojure/clj_http/client.ts"],"names":[],"mappings":"AAuFA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;CAqGpB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/clojure/clj_http/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for Clojure using clj-http.\n *\n * @author\n * @tggreene\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { getHeader, getHeaderName } from '../../../helpers/headers.js'\n\nclass Keyword {\n constructor(name) {\n this.name = ''\n this.toString = () => `:${this.name}`\n this.name = name\n }\n}\nclass File {\n constructor(path) {\n this.path = ''\n this.toString = () => `(clojure.java.io/file \"${this.path}\")`\n this.path = path\n }\n}\nconst jsType = (input) => {\n if (input === undefined) {\n return null\n }\n if (input === null) {\n return 'null'\n }\n return input.constructor.name.toLowerCase()\n}\nconst objEmpty = (input) => {\n if (jsType(input) === 'object') {\n return Object.keys(input).length === 0\n }\n return false\n}\nconst filterEmpty = (input) => {\n Object.keys(input)\n .filter((x) => objEmpty(input[x]))\n .forEach((x) => {\n delete input[x]\n })\n return input\n}\nconst padBlock = (padSize, input) => {\n const padding = ' '.repeat(padSize)\n return input.replace(/\\n/g, `\\n${padding}`)\n}\nconst jsToEdn = (js) => {\n switch (jsType(js)) {\n case 'string':\n return `\"${js.replace(/\"/g, '\\\\\"')}\"`\n case 'file':\n return js.toString()\n case 'keyword':\n return js.toString()\n case 'null':\n return 'nil'\n case 'regexp':\n return `#\"${js.source}\"`\n case 'object': {\n // simple vertical format\n const obj = Object.keys(js)\n .reduce((accumulator, key) => {\n const val = padBlock(key.length + 2, jsToEdn(js[key]))\n return `${accumulator}:${key} ${val}\\n `\n }, '')\n .trim()\n return `{${padBlock(1, obj)}}`\n }\n case 'array': {\n // simple horizontal format\n const arr = js\n .reduce((accumulator, value) => `${accumulator} ${jsToEdn(value)}`, '')\n .trim()\n return `[${padBlock(1, arr)}]`\n }\n default: // 'number' 'boolean'\n return js.toString()\n }\n}\nexport const clj_http = {\n info: {\n key: 'clj_http',\n title: 'clj-http',\n link: 'https://github.com/dakrone/clj-http',\n description: 'An idiomatic clojure http client wrapping the apache client.',\n },\n convert: ({ queryObj, method, postData, url, allHeaders }, options) => {\n const { push, join } = new CodeBuilder({\n indent: options === null || options === void 0 ? void 0 : options.indent,\n })\n const methods = ['get', 'post', 'put', 'delete', 'patch', 'head', 'options']\n method = method.toLowerCase()\n if (!methods.includes(method)) {\n push('Method not supported')\n return join()\n }\n const params = {\n 'headers': allHeaders,\n 'query-params': queryObj,\n }\n\n // Remove query string from URL if queryObj has parameters\n if (queryObj && Object.keys(queryObj).length > 0) {\n url = url.split('?')[0]\n }\n\n switch (\n postData === null || postData === void 0 ? void 0 : postData.mimeType\n ) {\n case 'application/json':\n {\n params['content-type'] = new Keyword('json')\n params['form-params'] = postData.jsonObj\n const header = getHeaderName(params.headers, 'content-type')\n if (header) {\n delete params.headers[header]\n }\n }\n break\n case 'application/x-www-form-urlencoded':\n {\n params['form-params'] = postData.paramsObj\n const header = getHeaderName(params.headers, 'content-type')\n if (header) {\n delete params.headers[header]\n }\n }\n break\n case 'text/plain':\n {\n params.body = postData.text\n const header = getHeaderName(params.headers, 'content-type')\n if (header) {\n delete params.headers[header]\n }\n }\n break\n case 'multipart/form-data': {\n if (postData.params) {\n params.multipart = postData.params.map((param) => {\n if (param.fileName && !param.value) {\n return {\n name: param.name,\n content: new File(param.fileName),\n }\n }\n return {\n name: param.name,\n content: param.value,\n }\n })\n const header = getHeaderName(params.headers, 'content-type')\n if (header) {\n delete params.headers[header]\n }\n }\n break\n }\n }\n switch (getHeader(params.headers, 'accept')) {\n case 'application/json':\n {\n params.accept = new Keyword('json')\n const header = getHeaderName(params.headers, 'accept')\n if (header) {\n delete params.headers[header]\n }\n }\n break\n }\n push(\"(require '[clj-http.client :as client])\\n\")\n if (objEmpty(filterEmpty(params))) {\n push(`(client/${method} \"${url}\")`)\n } else {\n const padding = 11 + method.length + url.length\n const formattedParams = padBlock(padding, jsToEdn(filterEmpty(params)))\n push(`(client/${method} \"${url}\" ${formattedParams})`)\n }\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,WAAW,qBAAqB;AAEzC,MAAM,QAAQ;AAAA,EACZ,YAAY,MAAM;AAChB,SAAK,OAAO;AACZ,SAAK,WAAW,MAAM,IAAI,KAAK,IAAI;AACnC,SAAK,OAAO;AAAA,EACd;AACF;AACA,MAAM,KAAK;AAAA,EACT,YAAY,MAAM;AAChB,SAAK,OAAO;AACZ,SA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,IAAI;AACzC,YAAM,kBAAkB,SAAS,SAAS,QAAQ,YAAY,MAAM,CAAC,CAAC;AACtE,WAAK,WAAW,MAAM,KAAK,GAAG,KAAK,eAAe,GAAG;AAAA,IACvD;AACA,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const clojure: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
clj_http: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ queryObj, method, postData, url, allHeaders }: {
|
|
17
|
-
queryObj: any;
|
|
18
|
-
method: any;
|
|
19
|
-
postData: any;
|
|
20
|
-
url: any;
|
|
21
|
-
allHeaders: any;
|
|
22
|
-
}, options: any) => any;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/clojure/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { clj_http } from "./clj_http/client.js";
|
|
2
|
-
const clojure = {
|
|
3
|
-
info: {
|
|
4
|
-
key: "clojure",
|
|
5
|
-
title: "Clojure",
|
|
6
|
-
extname: ".clj",
|
|
7
|
-
default: "clj_http"
|
|
8
|
-
},
|
|
9
|
-
clientsById: {
|
|
10
|
-
clj_http
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
clojure
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/clojure/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { clj_http } from './clj_http/client.js'\n\nexport const clojure = {\n info: {\n key: 'clojure',\n title: 'Clojure',\n extname: '.clj',\n default: 'clj_http',\n },\n clientsById: {\n clj_http,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,gBAAgB;AAElB,MAAM,UAAU;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const restsharp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ allHeaders, method, fullUrl, headersObj, cookies, postData }: {
|
|
9
|
-
allHeaders: any;
|
|
10
|
-
method: any;
|
|
11
|
-
fullUrl: any;
|
|
12
|
-
headersObj: any;
|
|
13
|
-
cookies: any;
|
|
14
|
-
postData: any;
|
|
15
|
-
}) => any;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/csharp/restsharp/client.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CA4CrB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/csharp/restsharp/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\nimport { getHeader } from '../../../helpers/headers.js'\n\nexport const restsharp = {\n info: {\n key: 'restsharp',\n title: 'RestSharp',\n link: 'http://restsharp.org/',\n description: 'Simple REST and HTTP API Client for .NET',\n },\n convert: ({ allHeaders, method, fullUrl, headersObj, cookies, postData }) => {\n const { push, join } = new CodeBuilder()\n const isSupportedMethod = [\n 'GET',\n 'POST',\n 'PUT',\n 'DELETE',\n 'PATCH',\n 'HEAD',\n 'OPTIONS',\n ].includes(method.toUpperCase())\n if (!isSupportedMethod) {\n return 'Method not supported'\n }\n push(`var client = new RestClient(\"${fullUrl}\");`)\n push(`var request = new RestRequest(Method.${method.toUpperCase()});`)\n // Add headers, including the cookies\n Object.keys(headersObj).forEach((key) => {\n push(\n `request.AddHeader(\"${key}\", \"${escapeForDoubleQuotes(headersObj[key])}\");`,\n )\n })\n cookies === null || cookies === void 0\n ? void 0\n : cookies.forEach(({ name, value }) => {\n push(`request.AddCookie(\"${name}\", \"${value}\");`)\n })\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n const header = getHeader(allHeaders, 'content-type')\n const text = JSON.stringify(postData.text)\n push(\n `request.AddParameter(\"${header}\", ${text}, ParameterType.RequestBody);`,\n )\n }\n push('IRestResponse response = client.Execute(request);')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AACtC,SAAS,iBAAiB;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,YAAY,QAAQ,SAAS,YAAY,SAAS,SAAS,MAAM;AAC3E,UAAM,EAAE,MAAM,KAAK,IAAI,IAAI,YAAY;AACvC,UAAM,oBAAoB;AAAA,MACxB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF,EAAE,SAAS,OAAO,YAAY,CAAC;AAC/B,QAAI,CAAC,mBAAmB;AACtB,aAAO;AAAA,IACT;AACA,SAAK,gCAAgC,OAAO,KAAK;AACjD,SAAK,wCAAwC,OAAO,YAAY,CAAC,IAAI;AAErE,WAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACvC;AAAA,QACE,sBAAsB,GAAG,OAAO,sBAAsB,WAAW,GAAG,CAAC,CAAC;AAAA,MACxE;AAAA,IACF,CAAC;AACD,gBAAY,QAAQ,YAAY,SAC5B,SACA,QAAQ,QAAQ,CAAC,EAAE,MAAM,MAAM,MAAM;AACnC,WAAK,sBAAsB,IAAI,OAAO,KAAK,KAAK;AAAA,IAClD,CAAC;AACL,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,YAAM,SAAS,UAAU,YAAY,cAAc;AACnD,YAAM,OAAO,KAAK,UAAU,SAAS,IAAI;AACzC;AAAA,QACE,yBAAyB,MAAM,MAAM,IAAI;AAAA,MAC3C;AAAA,IACF;AACA,SAAK,mDAAmD;AACxD,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const csharp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
restsharp: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ allHeaders, method, fullUrl, headersObj, cookies, postData }: {
|
|
17
|
-
allHeaders: any;
|
|
18
|
-
method: any;
|
|
19
|
-
fullUrl: any;
|
|
20
|
-
headersObj: any;
|
|
21
|
-
cookies: any;
|
|
22
|
-
postData: any;
|
|
23
|
-
}) => any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/csharp/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { restsharp } from "./restsharp/client.js";
|
|
2
|
-
const csharp = {
|
|
3
|
-
info: {
|
|
4
|
-
key: "csharp",
|
|
5
|
-
title: "C#",
|
|
6
|
-
extname: ".cs",
|
|
7
|
-
default: "restsharp"
|
|
8
|
-
},
|
|
9
|
-
clientsById: {
|
|
10
|
-
restsharp
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
csharp
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/csharp/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { restsharp } from './restsharp/client.js'\n\nexport const csharp = {\n info: {\n key: 'csharp',\n title: 'C#',\n extname: '.cs',\n default: 'restsharp',\n },\n clientsById: {\n restsharp,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,iBAAiB;AAEnB,MAAM,SAAS;AAAA,EACpB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const native: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ postData, method, allHeaders, fullUrl }: {
|
|
9
|
-
postData: any;
|
|
10
|
-
method: any;
|
|
11
|
-
allHeaders: any;
|
|
12
|
-
fullUrl: any;
|
|
13
|
-
}, options?: {}) => any;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/go/native/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAoLlB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/go/native/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for native Go.\n *\n * @author\n * @montanaflynn\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const native = {\n info: {\n key: 'native',\n title: 'NewRequest',\n link: 'http://golang.org/pkg/net/http/#NewRequest',\n description: 'Golang HTTP client request',\n },\n convert: ({ postData, method, allHeaders, fullUrl }, options = {}) => {\n const { blank, push, join, addPostProcessor } = new CodeBuilder({ indent: '\\t' })\n const {\n showBoilerplate = true,\n checkErrors = false,\n printBody = true,\n timeout = -1,\n insecureSkipVerify = false,\n } = options\n const errorPlaceholder = checkErrors ? 'err' : '_'\n const indent = showBoilerplate ? 1 : 0\n const errorCheck = () => {\n if (checkErrors) {\n push('if err != nil {', indent)\n push('panic(err)', indent + 1)\n push('}', indent)\n }\n }\n // Create boilerplate\n const imports = new Set()\n if (showBoilerplate) {\n push('package main')\n blank()\n\n push('import ()')\n addPostProcessor((code) => {\n const importArray = [...imports]\n importArray.sort()\n const importBlock = importArray.map((line) => `\\t\"${line}\"`).join('\\n')\n return code.replace(/import \\(\\)/, `import (\\n${importBlock}\\n)`)\n })\n\n imports.add('fmt')\n imports.add('net/http')\n\n blank()\n push('func main() {')\n }\n // Create an insecure transport for the client\n if (insecureSkipVerify) {\n imports.add('crypto/tls')\n push(\n 'insecureTransport := http.DefaultTransport.(*http.Transport).Clone()',\n indent,\n )\n push(\n 'insecureTransport.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}',\n indent,\n )\n }\n // Create client\n const hasTimeout = timeout > 0\n const hasClient = hasTimeout || insecureSkipVerify\n const client = hasClient ? 'client' : 'http.DefaultClient'\n if (hasClient) {\n push('client := http.Client{', indent)\n if (hasTimeout) {\n imports.add('time')\n push(`Timeout: time.Duration(${timeout} * time.Second),`, indent + 1)\n }\n if (insecureSkipVerify) {\n push('Transport: insecureTransport,', indent + 1)\n }\n push('}', indent)\n blank()\n }\n push(`url := \"${fullUrl}\"`, indent)\n blank()\n // If we have body content or not create the var and reader or nil\n if (postData !== null && postData !== void 0 && (postData.params || postData.text)) {\n if (postData.mimeType === 'application/x-www-form-urlencoded' && postData.params) {\n imports.add('net/url')\n imports.add('strings')\n\n push('postData := url.Values{}', indent)\n postData.params.forEach((param) => {\n push(\n `postData.Set(\"${param.name}\", \"${escapeForDoubleQuotes(param.value)}\")`,\n indent,\n )\n })\n blank()\n push(\n `req, ${errorPlaceholder} := http.NewRequest(\"${method}\", url, strings.NewReader(postData.Encode()))`,\n indent,\n )\n } else if (postData.mimeType === 'multipart/form-data' && postData.params) {\n imports.add('bytes')\n imports.add('mime/multipart')\n\n push('payload := &bytes.Buffer{}', indent)\n push('writer := multipart.NewWriter(payload)', indent)\n postData.params.forEach((param) => {\n blank()\n if (param.fileName) {\n push(`part, ${errorPlaceholder} := writer.CreateFormFile(\"${param.name}\", \"${param.fileName}\")`, indent)\n errorCheck()\n blank()\n push(`f, ${errorPlaceholder} := os.Open(\"${param.fileName}\")`, indent)\n errorCheck()\n push('defer f.Close()', indent)\n blank()\n push(`_, ${errorPlaceholder} = io.Copy(part, f)`, indent)\n errorCheck()\n } else {\n push(`${errorPlaceholder} = writer.WriteField(\"${param.name}\", \"${escapeForDoubleQuotes(param.value)}\")`, indent)\n errorCheck()\n }\n })\n push('writer.Close()', indent)\n blank()\n push(\n `req, ${errorPlaceholder} := http.NewRequest(\"${method}\", url, payload)`,\n indent,\n )\n } else {\n imports.add('strings')\n\n push(\n `payload := strings.NewReader(${JSON.stringify(postData.text)})`,\n indent,\n )\n blank()\n push(\n `req, ${errorPlaceholder} := http.NewRequest(\"${method}\", url, payload)`,\n indent,\n )\n }\n } else {\n push(\n `req, ${errorPlaceholder} := http.NewRequest(\"${method}\", url, nil)`,\n indent,\n )\n }\n errorCheck()\n blank()\n // Add headers\n if (postData !== null && postData !== void 0 && postData.mimeType === 'multipart/form-data' && postData.params) {\n push(`req.Header.Set(\"Content-Type\", writer.FormDataContentType())`, indent)\n }\n if (Object.keys(allHeaders).length) {\n Object.keys(allHeaders).forEach((key) => {\n push(\n `req.Header.Add(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\")`,\n indent,\n )\n })\n blank()\n }\n // Make request\n push(`res, ${errorPlaceholder} := ${client}.Do(req)`, indent)\n errorCheck()\n // Get Body\n if (printBody) {\n imports.add('io')\n blank()\n push('defer res.Body.Close()', indent)\n push(`body, ${errorPlaceholder} := io.ReadAll(res.Body)`, indent)\n errorCheck()\n }\n // Print it\n blank()\n push('fmt.Println(res)', indent)\n if (printBody) {\n push('fmt.Println(string(body))', indent)\n }\n // End main block\n if (showBoilerplate) {\n blank()\n push('}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AA,IACb;AAEA,UAAM;AACN,SAAK,oBAAoB,MAAM;AAC/B,QAAI,WAAW;AACb,WAAK,6BAA6B,MAAM;AAAA,IAC1C;AAEA,QAAI,iBAAiB;AACnB,YAAM;AACN,WAAK,GAAG;AAAA,IACV;AACA,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const go: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
native: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ postData, method, allHeaders, fullUrl }: {
|
|
17
|
-
postData: any;
|
|
18
|
-
method: any;
|
|
19
|
-
allHeaders: any;
|
|
20
|
-
fullUrl: any;
|
|
21
|
-
}, options?: {}) => any;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/go/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;CAUd,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/go/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { native } from './native/client.js'\n\nexport const go = {\n info: {\n key: 'go',\n title: 'Go',\n extname: '.go',\n default: 'native',\n },\n clientsById: {\n native,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,cAAc;AAEhB,MAAM,KAAK;AAAA,EAChB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const asynchttp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ method, allHeaders, postData, fullUrl }: {
|
|
9
|
-
method: any;
|
|
10
|
-
allHeaders: any;
|
|
11
|
-
postData: any;
|
|
12
|
-
fullUrl: any;
|
|
13
|
-
}, options: any) => any;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/java/asynchttp/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;CAiCrB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/java/asynchttp/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * Asynchronous Http and WebSocket Client library for Java\n *\n * @author\n * @windard\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const asynchttp = {\n info: {\n key: 'asynchttp',\n title: 'AsyncHttp',\n link: 'https://github.com/AsyncHttpClient/async-http-client',\n description: 'Asynchronous Http and WebSocket Client library for Java',\n },\n convert: ({ method, allHeaders, postData, fullUrl }, options) => {\n const opts = {\n indent: ' ',\n ...options,\n }\n const { blank, push, join } = new CodeBuilder({ indent: opts.indent })\n push('AsyncHttpClient client = new DefaultAsyncHttpClient();')\n push(`client.prepare(\"${method.toUpperCase()}\", \"${fullUrl}\")`)\n // Add headers, including the cookies\n Object.keys(allHeaders).forEach((key) => {\n push(\n `.setHeader(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\")`,\n 1,\n )\n })\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(`.setBody(${JSON.stringify(postData.text)})`, 1)\n }\n push('.execute()', 1)\n push('.toCompletableFuture()', 1)\n push('.thenAccept(System.out::println)', 1)\n push('.join();', 1)\n blank()\n push('client.close();')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,QAAQ,YAAY,UAAU,QAAQ,GAAG,YAAY;AAC/D,UAAM,OAAO;AAAA,MACX,QAAQ;AAAA,MACR,GAAG;AAAA,IACL;AACA,UAAM,EAAE,OAAO,MAAM,KAAK,IAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,OAAO,CAAC;AACrE,SAAK,wDAAwD;AAC7D,SAAK,mBAAmB,OAAO,YAAY,CAAC,OAAO,OAAO,IAAI;AAE9D,WAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACvC;AAAA,QACE,eAAe,GAAG,OAAO,sBAAsB,WAAW,GAAG,CAAC,CAAC;AAAA,QAC/D;AAAA,MACF;AAAA,IACF,CAAC;AACD,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,WAAK,YAAY,KAAK,UAAU,SAAS,IAAI,CAAC,KAAK,CAAC;AAAA,IACtD;AACA,SAAK,cAAc,CAAC;AACpB,SAAK,0BAA0B,CAAC;AAChC,SAAK,oCAAoC,CAAC;AAC1C,SAAK,YAAY,CAAC;AAClB,UAAM;AACN,SAAK,iBAAiB;AACtB,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const nethttp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ allHeaders, fullUrl, method, postData }: {
|
|
9
|
-
allHeaders: any;
|
|
10
|
-
fullUrl: any;
|
|
11
|
-
method: any;
|
|
12
|
-
postData: any;
|
|
13
|
-
}, options: any) => any;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/java/nethttp/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAoCnB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/java/nethttp/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for Java using java.net.http.\n *\n * @author\n * @wtetsu\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const nethttp = {\n info: {\n key: 'nethttp',\n title: 'java.net.http',\n link: 'https://openjdk.java.net/groups/net/httpclient/intro.html',\n description: 'Java Standardized HTTP Client API',\n },\n convert: ({ allHeaders, fullUrl, method, postData }, options) => {\n const opts = {\n indent: ' ',\n ...options,\n }\n const { push, join } = new CodeBuilder({ indent: opts.indent })\n push('HttpRequest request = HttpRequest.newBuilder()')\n push(`.uri(URI.create(\"${fullUrl}\"))`, 2)\n Object.keys(allHeaders).forEach((key) => {\n push(`.header(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\")`, 2)\n })\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(\n `.method(\"${method.toUpperCase()}\", HttpRequest.BodyPublishers.ofString(${JSON.stringify(postData.text)}))`,\n 2,\n )\n } else {\n push(\n `.method(\"${method.toUpperCase()}\", HttpRequest.BodyPublishers.noBody())`,\n 2,\n )\n }\n push('.build();', 2)\n push(\n 'HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());',\n )\n push('System.out.println(response.body());')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,UAAU;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,YAAY,SAAS,QAAQ,SAAS,GAAG,YAAY;AAC/D,UAAM,OAAO;AAAA,MACX,QAAQ;AAAA,MACR,GAAG;AAAA,IACL;AACA,UAAM,EAAE,MAAM,KAAK,IAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,OAAO,CAAC;AAC9D,SAAK,gDAAgD;AACrD,SAAK,oBAAoB,OAAO,OAAO,CAAC;AACxC,WAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACvC,WAAK,YAAY,GAAG,OAAO,sBAAsB,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;AAAA,IAC1E,CAAC;AACD,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE;AAAA,QACE,YAAY,OAAO,YAAY,CAAC,0CAA0C,KAAK,UAAU,SAAS,IAAI,CAAC;AAAA,QACvG;AAAA,MACF;AAAA,IACF,OAAO;AACL;AAAA,QACE,YAAY,OAAO,YAAY,CAAC;AAAA,QAChC;AAAA,MACF;AAAA,IACF;AACA,SAAK,aAAa,CAAC;AACnB;AAAA,MACE;AAAA,IACF;AACA,SAAK,sCAAsC;AAC3C,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const okhttp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ postData, method, fullUrl, allHeaders }: {
|
|
9
|
-
postData: any;
|
|
10
|
-
method: any;
|
|
11
|
-
fullUrl: any;
|
|
12
|
-
allHeaders: any;
|
|
13
|
-
}, options: any) => any;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/java/okhttp/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CA0ElB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/java/okhttp/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for Java using OkHttp.\n *\n * @author\n * @shashiranjan84\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const okhttp = {\n info: {\n key: 'okhttp',\n title: 'OkHttp',\n link: 'http://square.github.io/okhttp/',\n description: 'An HTTP Request Client Library',\n },\n convert: ({ postData, method, fullUrl, allHeaders }, options) => {\n const opts = {\n indent: ' ',\n ...options,\n }\n const { push, blank, join } = new CodeBuilder({ indent: opts.indent })\n const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD']\n const methodsWithBody = ['POST', 'PUT', 'DELETE', 'PATCH']\n push('OkHttpClient client = new OkHttpClient();')\n blank()\n if (postData !== null && postData !== void 0) {\n if (postData.mimeType === 'application/x-www-form-urlencoded' && postData.params) {\n push('FormBody formBody = new FormBody.Builder()')\n postData.params.forEach((param) => {\n push(`.addEncoded(\"${param.name}\", \"${param.value}\")`, 1)\n })\n push('.build();', 1)\n blank()\n } else if (postData.mimeType === 'multipart/form-data' && postData.params) {\n push(`MultipartBody body = new MultipartBody.Builder()`)\n push(`.setType(MultipartBody.FORM)`, 1)\n postData.params.forEach((param) => {\n if (param.fileName !== undefined) {\n push(\n `.addFormDataPart(\"${param.name}\", \"${param.fileName}\", RequestBody.create(MediaType.parse(\"application/octet-stream\"), new File(\"${param.fileName}\")))`,\n 1,\n )\n } else if (param.value !== undefined) {\n push(`.addFormDataPart(\"${param.name}\", \"${param.value}\")`, 1)\n }\n })\n push('.build();', 1)\n blank()\n } else {\n push(`MediaType mediaType = MediaType.parse(\"${postData.mimeType}\");`)\n push(`RequestBody body = RequestBody.create(mediaType, ${JSON.stringify(postData.text)});`)\n }\n }\n push('Request request = new Request.Builder()')\n push(`.url(\"${fullUrl}\")`, 1)\n if (!methods.includes(method.toUpperCase())) {\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(`.method(\"${method.toUpperCase()}\", body)`, 1)\n } else {\n push(`.method(\"${method.toUpperCase()}\", null)`, 1)\n }\n } else if (methodsWithBody.includes(method.toUpperCase())) {\n if (postData === null || postData === void 0 ? void 0 : postData.text || postData.params) {\n push(`.${method.toLowerCase()}(body)`, 1)\n } else {\n push(`.${method.toLowerCase()}(null)`, 1)\n }\n } else {\n push(`.${method.toLowerCase()}()`, 1)\n }\n // Add headers, including the cookies\n Object.keys(allHeaders).forEach((key) => {\n push(\n `.addHeader(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\")`,\n 1,\n )\n })\n push('.build();', 1)\n blank()\n push('Response response = client.newCall(request).execute();')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,SAAS;AAAA,EACpB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,UAAU,QAAQ,SAAS,WAAW,GAAG,YAAY;AAC/D,UAAM,OAAO;AAAA,MACX,QAAQ;AAAA,MACR,GAAG;AAAA,IACL;AACA,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,OAAO,CAAC;AACrE,UAAM,UAAU,CAAC,OAAO,QAAQ,OAAO,UAAU,SAAS,MAAM;AAChE,UAAM,kBAAkB,CAAC,QAAQ,OAAO,UAAU,OAAO;AACzD,SAAK,2CAA2C;AAChD,UAAM;AACN,QAAI,aAAa,QAAQ,aAAa,QAAQ;AAC5C,UAAI,SAAS,aAAa,uCAAuC,SAAS,QAAQ;AAChF,aAAK,4CAA4C;AACjD,iBAAS,OAAO,QAAQ,CAAC,UAAU;AACjC,eAAK,gBAAgB,MAAM,IAAI,OAAO,MAAM,KAAK,MAAM,CAAC;AAAA,QAC1D,CAAC;AACD,aAAK,aAAa,CAAC;AACnB,cAAM;AAAA,MACR,WAAW,SAAS,aAAa,yBAAyB,SAAS,QAAQ;AACzE,aAAK,kDAAkD;AACvD,aAAK,gCAAgC,CAAC;AACtC,iBAAS,OAAO,QAAQ,CAAC,UAAU;AACjC,cAAI,MAAM,aAAa,QAAW;AAChC;AAAA,cACE,qBAAqB,MAAM,IAAI,OAAO,MAAM,QAAQ,gFAAgF,MAA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|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
export declare const java: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
asynchttp: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ method, allHeaders, postData, fullUrl }: {
|
|
17
|
-
method: any;
|
|
18
|
-
allHeaders: any;
|
|
19
|
-
postData: any;
|
|
20
|
-
fullUrl: any;
|
|
21
|
-
}, options: any) => any;
|
|
22
|
-
};
|
|
23
|
-
nethttp: {
|
|
24
|
-
info: {
|
|
25
|
-
key: string;
|
|
26
|
-
title: string;
|
|
27
|
-
link: string;
|
|
28
|
-
description: string;
|
|
29
|
-
};
|
|
30
|
-
convert: ({ allHeaders, fullUrl, method, postData }: {
|
|
31
|
-
allHeaders: any;
|
|
32
|
-
fullUrl: any;
|
|
33
|
-
method: any;
|
|
34
|
-
postData: any;
|
|
35
|
-
}, options: any) => any;
|
|
36
|
-
};
|
|
37
|
-
okhttp: {
|
|
38
|
-
info: {
|
|
39
|
-
key: string;
|
|
40
|
-
title: string;
|
|
41
|
-
link: string;
|
|
42
|
-
description: string;
|
|
43
|
-
};
|
|
44
|
-
convert: ({ postData, method, fullUrl, allHeaders }: {
|
|
45
|
-
postData: any;
|
|
46
|
-
method: any;
|
|
47
|
-
fullUrl: any;
|
|
48
|
-
allHeaders: any;
|
|
49
|
-
}, options: any) => any;
|
|
50
|
-
};
|
|
51
|
-
unirest: {
|
|
52
|
-
info: {
|
|
53
|
-
key: string;
|
|
54
|
-
title: string;
|
|
55
|
-
link: string;
|
|
56
|
-
description: string;
|
|
57
|
-
};
|
|
58
|
-
convert: ({ method, allHeaders, postData, fullUrl }: {
|
|
59
|
-
method: any;
|
|
60
|
-
allHeaders: any;
|
|
61
|
-
postData: any;
|
|
62
|
-
fullUrl: any;
|
|
63
|
-
}, options: any) => any;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/java/target.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAahB,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { asynchttp } from "./asynchttp/client.js";
|
|
2
|
-
import { nethttp } from "./nethttp/client.js";
|
|
3
|
-
import { okhttp } from "./okhttp/client.js";
|
|
4
|
-
import { unirest } from "./unirest/client.js";
|
|
5
|
-
const java = {
|
|
6
|
-
info: {
|
|
7
|
-
key: "java",
|
|
8
|
-
title: "Java",
|
|
9
|
-
extname: ".java",
|
|
10
|
-
default: "unirest"
|
|
11
|
-
},
|
|
12
|
-
clientsById: {
|
|
13
|
-
asynchttp,
|
|
14
|
-
nethttp,
|
|
15
|
-
okhttp,
|
|
16
|
-
unirest
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
java
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/java/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { asynchttp } from './asynchttp/client.js'\nimport { nethttp } from './nethttp/client.js'\nimport { okhttp } from './okhttp/client.js'\nimport { unirest } from './unirest/client.js'\n\nexport const java = {\n info: {\n key: 'java',\n title: 'Java',\n extname: '.java',\n default: 'unirest',\n },\n clientsById: {\n asynchttp,\n nethttp,\n okhttp,\n unirest,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,iBAAiB;AAC1B,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,eAAe;AAEjB,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const unirest: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ method, allHeaders, postData, fullUrl }: {
|
|
9
|
-
method: any;
|
|
10
|
-
allHeaders: any;
|
|
11
|
-
postData: any;
|
|
12
|
-
fullUrl: any;
|
|
13
|
-
}, options: any) => any;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/java/unirest/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,OAAO;;;;;;;;;;;;;CAiCnB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/java/unirest/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for Java using Unirest.\n *\n * @author\n * @shashiranjan84\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const unirest = {\n info: {\n key: 'unirest',\n title: 'Unirest',\n link: 'http://unirest.io/java.html',\n description: 'Lightweight HTTP Request Client Library',\n },\n convert: ({ method, allHeaders, postData, fullUrl }, options) => {\n const opts = {\n indent: ' ',\n ...options,\n }\n const { join, push } = new CodeBuilder({ indent: opts.indent })\n const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS']\n if (!methods.includes(method.toUpperCase())) {\n push(\n `HttpResponse<String> response = Unirest.customMethod(\"${method.toUpperCase()}\",\"${fullUrl}\")`,\n )\n } else {\n push(\n `HttpResponse<String> response = Unirest.${method.toLowerCase()}(\"${fullUrl}\")`,\n )\n }\n // Add headers, including the cookies\n Object.keys(allHeaders).forEach((key) => {\n push(`.header(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\")`, 1)\n })\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(`.body(${JSON.stringify(postData.text)})`, 1)\n }\n push('.asString();', 1)\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,UAAU;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,QAAQ,YAAY,UAAU,QAAQ,GAAG,YAAY;AAC/D,UAAM,OAAO;AAAA,MACX,QAAQ;AAAA,MACR,GAAG;AAAA,IACL;AACA,UAAM,EAAE,MAAM,KAAK,IAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,OAAO,CAAC;AAC9D,UAAM,UAAU,CAAC,OAAO,QAAQ,OAAO,UAAU,SAAS,QAAQ,SAAS;AAC3E,QAAI,CAAC,QAAQ,SAAS,OAAO,YAAY,CAAC,GAAG;AAC3C;AAAA,QACE,yDAAyD,OAAO,YAAY,CAAC,MAAM,OAAO;AAAA,MAC5F;AAAA,IACF,OAAO;AACL;AAAA,QACE,2CAA2C,OAAO,YAAY,CAAC,KAAK,OAAO;AAAA,MAC7E;AAAA,IACF;AAEA,WAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,QAAQ;AACvC,WAAK,YAAY,GAAG,OAAO,sBAAsB,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;AAAA,IAC1E,CAAC;AACD,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,WAAK,SAAS,KAAK,UAAU,SAAS,IAAI,CAAC,KAAK,CAAC;AAAA,IACnD;AACA,SAAK,gBAAgB,CAAC;AACtB,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|