@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,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/objc/nsurlsession/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for Objective-C using NSURLSession.\n *\n * @author\n * @thibaultCha\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 { nsDeclaration } from '../helpers.js'\n\nexport const nsurlsession = {\n info: {\n key: 'nsurlsession',\n title: 'NSURLSession',\n link: 'https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/index.html',\n description: \"Foundation's NSURLSession request\",\n },\n convert: ({ allHeaders, postData, method, fullUrl }, options) => {\n let _a\n const opts = {\n indent: ' ',\n pretty: true,\n timeout: 10,\n ...options,\n }\n const { push, join, blank } = new CodeBuilder({ indent: opts.indent })\n // Markers for headers to be created as literal objects and later be set on the NSURLRequest if exist\n const req = {\n hasHeaders: false,\n hasBody: false,\n }\n // We just want to make sure people understand that is the only dependency\n push('#import <Foundation/Foundation.h>')\n if (Object.keys(allHeaders).length) {\n req.hasHeaders = true\n blank()\n push(nsDeclaration('NSDictionary', 'headers', allHeaders, opts.pretty))\n }\n if (postData && (postData.text || postData.jsonObj || postData.params)) {\n req.hasBody = true\n switch (postData.mimeType) {\n case 'application/x-www-form-urlencoded':\n if (\n (_a = postData.params) === null || _a === void 0\n ? void 0\n : _a.length\n ) {\n // By appending parameters one by one in the resulting snippet,\n // we make it easier for the user to edit it according to his or her needs after pasting.\n // The user can just add/remove lines adding/removing body parameters.\n blank()\n const [head, ...tail] = postData.params\n push(\n `NSMutableData *postData = [[NSMutableData alloc] initWithData:[@\"${head.name}=${head.value}\" dataUsingEncoding:NSUTF8StringEncoding]];`,\n )\n tail.forEach(({ name, value }) => {\n push(\n `[postData appendData:[@\"&${name}=${value}\" dataUsingEncoding:NSUTF8StringEncoding]];`,\n )\n })\n } else {\n req.hasBody = false\n }\n break\n case 'application/json':\n if (postData.jsonObj) {\n push(\n nsDeclaration(\n 'NSDictionary',\n 'parameters',\n postData.jsonObj,\n opts.pretty,\n ),\n )\n blank()\n push(\n 'NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];',\n )\n }\n break\n case 'multipart/form-data':\n // By appending multipart parameters one by one in the resulting snippet,\n // we make it easier for the user to edit it according to his or her needs after pasting.\n // The user can just edit the parameters NSDictionary or put this part of a snippet in a multipart builder method.\n push(\n nsDeclaration(\n 'NSArray',\n 'parameters',\n postData.params || [],\n opts.pretty,\n ),\n )\n push(`NSString *boundary = @\"${postData.boundary}\";`)\n blank()\n push('NSError *error;')\n push('NSMutableString *body = [NSMutableString string];')\n push('for (NSDictionary *param in parameters) {')\n push('[body appendFormat:@\"--%@\\\\r\\\\n\", boundary];', 1)\n push('if (param[@\"fileName\"]) {', 1)\n push(\n '[body appendFormat:@\"Content-Disposition:form-data; name=\\\\\"%@\\\\\"; filename=\\\\\"%@\\\\\"\\\\r\\\\n\", param[@\"name\"], param[@\"fileName\"]];',\n 2,\n )\n push(\n '[body appendFormat:@\"Content-Type: %@\\\\r\\\\n\\\\r\\\\n\", param[@\"contentType\"]];',\n 2,\n )\n push(\n '[body appendFormat:@\"%@\", [NSString stringWithContentsOfFile:param[@\"fileName\"] encoding:NSUTF8StringEncoding error:&error]];',\n 2,\n )\n push('if (error) {', 2)\n push('NSLog(@\"%@\", error);', 3)\n push('}', 2)\n push('} else {', 1)\n push(\n '[body appendFormat:@\"Content-Disposition:form-data; name=\\\\\"%@\\\\\"\\\\r\\\\n\\\\r\\\\n\", param[@\"name\"]];',\n 2,\n )\n push('[body appendFormat:@\"%@\", param[@\"value\"]];', 2)\n push('}', 1)\n push('}')\n push('[body appendFormat:@\"\\\\r\\\\n--%@--\\\\r\\\\n\", boundary];')\n push(\n 'NSData *postData = [body dataUsingEncoding:NSUTF8StringEncoding];',\n )\n break\n default:\n blank()\n push(\n `NSData *postData = [[NSData alloc] initWithData:[@\"${postData.text}\" dataUsingEncoding:NSUTF8StringEncoding]];`,\n )\n }\n }\n blank()\n push(\n `NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@\"${fullUrl}\"]`,\n )\n // NSURLRequestUseProtocolCachePolicy is the default policy, let's just always set it to avoid confusion.\n push(\n ' cachePolicy:NSURLRequestUseProtocolCachePolicy',\n )\n push(\n ` timeoutInterval:${opts.timeout.toFixed(1)}];`,\n )\n push(`[request setHTTPMethod:@\"${method}\"];`)\n if (req.hasHeaders) {\n push('[request setAllHTTPHeaderFields:headers];')\n }\n if (req.hasBody) {\n push('[request setHTTPBody:postData];')\n }\n blank()\n // Retrieving the shared session will be less verbose than creating a new one.\n push('NSURLSession *session = [NSURLSession sharedSession];')\n push(\n 'NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request',\n )\n push(\n ' completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {',\n )\n push(' if (error) {', 1)\n push(' NSLog(@\"%@\", error);', 2)\n push(' } else {', 1)\n // Casting the NSURLResponse to NSHTTPURLResponse so the user can see the status .\n push(\n ' NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;',\n 2,\n )\n push(\n ' NSLog(@\"%@\", httpResponse);',\n 2,\n )\n push(' }', 1)\n push(' }];')\n push('[dataTask resume];')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,qBAAqB;AAEvB,MAAM,eAAe;AAA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,CAAC;AAE9D;AAAA,MACE;AAAA,MACA;AAAA,IACF;AACA;AAAA,MACE;AAAA,MACA;AAAA,IACF;AACA,SAAK,iDAAiD,CAAC;AACvD,SAAK,iDAAiD;AACtD,SAAK,oBAAoB;AACzB,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const objc: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
nsurlsession: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ allHeaders, postData, method, fullUrl }: {
|
|
17
|
-
allHeaders: any;
|
|
18
|
-
postData: any;
|
|
19
|
-
method: any;
|
|
20
|
-
fullUrl: any;
|
|
21
|
-
}, options: any) => 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/objc/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { nsurlsession } from "./nsurlsession/client.js";
|
|
2
|
-
const objc = {
|
|
3
|
-
info: {
|
|
4
|
-
key: "objc",
|
|
5
|
-
title: "Objective-C",
|
|
6
|
-
extname: ".m",
|
|
7
|
-
default: "nsurlsession"
|
|
8
|
-
},
|
|
9
|
-
clientsById: {
|
|
10
|
-
nsurlsession
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
objc
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/objc/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { nsurlsession } from './nsurlsession/client.js'\n\nexport const objc = {\n info: {\n key: 'objc',\n title: 'Objective-C',\n extname: '.m',\n default: 'nsurlsession',\n },\n clientsById: {\n nsurlsession,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,oBAAoB;AAEtB,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,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const cohttp: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ fullUrl, allHeaders, postData, method }: {
|
|
9
|
-
fullUrl: any;
|
|
10
|
-
allHeaders: any;
|
|
11
|
-
postData: any;
|
|
12
|
-
method: 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/ocaml/cohttp/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAyDlB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/ocaml/cohttp/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for OCaml using CoHTTP.\n *\n * @author\n * @SGrondin\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 cohttp = {\n info: {\n key: 'cohttp',\n title: 'CoHTTP',\n link: 'https://github.com/mirage/ocaml-cohttp',\n description:\n 'Cohttp is a very lightweight HTTP server using Lwt or Async for OCaml',\n },\n convert: ({ fullUrl, allHeaders, postData, method }, options) => {\n const opts = {\n indent: ' ',\n ...options,\n }\n const methods = ['get', 'post', 'head', 'delete', 'patch', 'put', 'options']\n const { push, blank, join } = new CodeBuilder({ indent: opts.indent })\n push('open Cohttp_lwt_unix')\n push('open Cohttp')\n push('open Lwt')\n blank()\n push(`let uri = Uri.of_string \"${fullUrl}\" in`)\n // Add headers, including the cookies\n const headers = Object.keys(allHeaders)\n if (headers.length === 1) {\n push(\n `let headers = Header.add (Header.init ()) \"${headers[0]}\" \"${escapeForDoubleQuotes(allHeaders[headers[0]])}\" in`,\n )\n } else if (headers.length > 1) {\n push('let headers = Header.add_list (Header.init ()) [')\n headers.forEach((key) => {\n push(`(\"${key}\", \"${escapeForDoubleQuotes(allHeaders[key])}\");`, 1)\n })\n push('] in')\n }\n // Add body\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n // Just text\n push(\n `let body = Cohttp_lwt_body.of_string ${JSON.stringify(postData.text)} in`,\n )\n }\n // Do the request\n blank()\n const h = headers.length ? '~headers ' : ''\n const b = (\n postData === null || postData === void 0 ? void 0 : postData.text\n )\n ? '~body '\n : ''\n const m = methods.includes(method.toLowerCase())\n ? `\\`${method.toUpperCase()}`\n : `(Code.method_of_string \"${method}\")`\n push(`Client.call ${h}${b}${m} uri`)\n // Catch result\n push('>>= fun (res, body_stream) ->')\n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E3D,WACA;AACJ,UAAM,IAAI,QAAQ,SAAS,OAAO,YAAY,CAAC,IAC3C,KAAK,OAAO,YAAY,CAAC,KACzB,2BAA2B,MAAM;AACrC,SAAK,eAAe,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM;AAEnC,SAAK,+BAA+B;AACpC,SAAK,kCAAkC,CAAC;AACxC,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export declare const ocaml: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
cohttp: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ fullUrl, allHeaders, postData, method }: {
|
|
17
|
-
fullUrl: any;
|
|
18
|
-
allHeaders: any;
|
|
19
|
-
postData: any;
|
|
20
|
-
method: any;
|
|
21
|
-
}, options: any) => 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/ocaml/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;CAUjB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { cohttp } from "./cohttp/client.js";
|
|
2
|
-
const ocaml = {
|
|
3
|
-
info: {
|
|
4
|
-
key: "ocaml",
|
|
5
|
-
title: "OCaml",
|
|
6
|
-
extname: ".ml",
|
|
7
|
-
default: "cohttp"
|
|
8
|
-
},
|
|
9
|
-
clientsById: {
|
|
10
|
-
cohttp
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
ocaml
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/ocaml/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { cohttp } from './cohttp/client.js'\n\nexport const ocaml = {\n info: {\n key: 'ocaml',\n title: 'OCaml',\n extname: '.ml',\n default: 'cohttp',\n },\n clientsById: {\n cohttp,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,cAAc;AAEhB,MAAM,QAAQ;AAAA,EACnB,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/php/helpers.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,WAAW,GAAI,QAAG,EAAE,WAAM,EAAE,eAAU,QAgClD,CAAA;AACD,eAAO,MAAM,gBAAgB,UA4B5B,CAAA"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { escapeString } from "../../helpers/escape.js";
|
|
2
|
-
const convertType = (obj, indent, lastIndent) => {
|
|
3
|
-
lastIndent = lastIndent || "";
|
|
4
|
-
indent = indent || "";
|
|
5
|
-
switch (Object.prototype.toString.call(obj)) {
|
|
6
|
-
case "[object Null]":
|
|
7
|
-
return "null";
|
|
8
|
-
case "[object Undefined]":
|
|
9
|
-
return "null";
|
|
10
|
-
case "[object String]":
|
|
11
|
-
return `'${escapeString(obj, { delimiter: "'", escapeNewlines: false })}'`;
|
|
12
|
-
case "[object Number]":
|
|
13
|
-
return obj.toString();
|
|
14
|
-
case "[object Array]": {
|
|
15
|
-
const contents = obj.map((item) => convertType(item, `${indent}${indent}`, indent)).join(`,
|
|
16
|
-
${indent}`);
|
|
17
|
-
return `[
|
|
18
|
-
${indent}${contents}
|
|
19
|
-
${lastIndent}]`;
|
|
20
|
-
}
|
|
21
|
-
case "[object Object]": {
|
|
22
|
-
const result = [];
|
|
23
|
-
for (const i in obj) {
|
|
24
|
-
if (Object.prototype.hasOwnProperty.call(obj, i)) {
|
|
25
|
-
result.push(
|
|
26
|
-
`${convertType(i, indent)} => ${convertType(obj[i], `${indent}${indent}`, indent)}`
|
|
27
|
-
);
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return `[
|
|
31
|
-
${indent}${result.join(`,
|
|
32
|
-
${indent}`)}
|
|
33
|
-
${lastIndent}]`;
|
|
34
|
-
}
|
|
35
|
-
default:
|
|
36
|
-
return "null";
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
const supportedMethods = [
|
|
40
|
-
"ACL",
|
|
41
|
-
"BASELINE_CONTROL",
|
|
42
|
-
"CHECKIN",
|
|
43
|
-
"CHECKOUT",
|
|
44
|
-
"CONNECT",
|
|
45
|
-
"COPY",
|
|
46
|
-
"DELETE",
|
|
47
|
-
"GET",
|
|
48
|
-
"HEAD",
|
|
49
|
-
"LABEL",
|
|
50
|
-
"LOCK",
|
|
51
|
-
"MERGE",
|
|
52
|
-
"MKACTIVITY",
|
|
53
|
-
"MKCOL",
|
|
54
|
-
"MKWORKSPACE",
|
|
55
|
-
"MOVE",
|
|
56
|
-
"OPTIONS",
|
|
57
|
-
"POST",
|
|
58
|
-
"PROPFIND",
|
|
59
|
-
"PROPPATCH",
|
|
60
|
-
"PUT",
|
|
61
|
-
"REPORT",
|
|
62
|
-
"TRACE",
|
|
63
|
-
"UNCHECKOUT",
|
|
64
|
-
"UNLOCK",
|
|
65
|
-
"UPDATE",
|
|
66
|
-
"VERSION_CONTROL"
|
|
67
|
-
];
|
|
68
|
-
export {
|
|
69
|
-
convertType,
|
|
70
|
-
supportedMethods
|
|
71
|
-
};
|
|
72
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/php/helpers.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { escapeString } from '../../helpers/escape.js'\n\nexport const convertType = (obj, indent, lastIndent) => {\n lastIndent = lastIndent || ''\n indent = indent || ''\n switch (Object.prototype.toString.call(obj)) {\n case '[object Null]':\n return 'null'\n case '[object Undefined]':\n return 'null'\n case '[object String]':\n return `'${escapeString(obj, { delimiter: \"'\", escapeNewlines: false })}'`\n case '[object Number]':\n return obj.toString()\n case '[object Array]': {\n const contents = obj\n .map((item) => convertType(item, `${indent}${indent}`, indent))\n .join(`,\\n${indent}`)\n return `[\\n${indent}${contents}\\n${lastIndent}]`\n }\n case '[object Object]': {\n const result = []\n for (const i in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, i)) {\n result.push(\n `${convertType(i, indent)} => ${convertType(obj[i], `${indent}${indent}`, indent)}`,\n )\n }\n }\n return `[\\n${indent}${result.join(`,\\n${indent}`)}\\n${lastIndent}]`\n }\n default:\n return 'null'\n }\n}\nexport const supportedMethods = [\n 'ACL',\n 'BASELINE_CONTROL',\n 'CHECKIN',\n 'CHECKOUT',\n 'CONNECT',\n 'COPY',\n 'DELETE',\n 'GET',\n 'HEAD',\n 'LABEL',\n 'LOCK',\n 'MERGE',\n 'MKACTIVITY',\n 'MKCOL',\n 'MKWORKSPACE',\n 'MOVE',\n 'OPTIONS',\n 'POST',\n 'PROPFIND',\n 'PROPPATCH',\n 'PUT',\n 'REPORT',\n 'TRACE',\n 'UNCHECKOUT',\n 'UNLOCK',\n 'UPDATE',\n 'VERSION_CONTROL',\n]\n"],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AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const http1: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ method, url, postData, queryObj, headersObj, cookiesObj }: {
|
|
9
|
-
method: any;
|
|
10
|
-
url: any;
|
|
11
|
-
postData: any;
|
|
12
|
-
queryObj: any;
|
|
13
|
-
headersObj: any;
|
|
14
|
-
cookiesObj: any;
|
|
15
|
-
}, options?: {}) => 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/php/http1/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;CAmFjB,CAAA"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { CodeBuilder } from "../../../helpers/code-builder.js";
|
|
2
|
-
import { convertType, supportedMethods } from "../helpers.js";
|
|
3
|
-
const http1 = {
|
|
4
|
-
info: {
|
|
5
|
-
key: "http1",
|
|
6
|
-
title: "HTTP v1",
|
|
7
|
-
link: "http://php.net/manual/en/book.http.php",
|
|
8
|
-
description: "PHP with pecl/http v1"
|
|
9
|
-
},
|
|
10
|
-
convert: ({ method, url, postData, queryObj, headersObj, cookiesObj }, options = {}) => {
|
|
11
|
-
const {
|
|
12
|
-
closingTag = false,
|
|
13
|
-
indent = " ",
|
|
14
|
-
noTags = false,
|
|
15
|
-
shortTags = false
|
|
16
|
-
} = options;
|
|
17
|
-
const { push, blank, join } = new CodeBuilder({ indent });
|
|
18
|
-
if (!noTags) {
|
|
19
|
-
push(shortTags ? "<?" : "<?php");
|
|
20
|
-
blank();
|
|
21
|
-
}
|
|
22
|
-
if (!supportedMethods.includes(method.toUpperCase())) {
|
|
23
|
-
push(`HttpRequest::methodRegister('${method}');`);
|
|
24
|
-
}
|
|
25
|
-
push("$request = new HttpRequest();");
|
|
26
|
-
push(`$request->setUrl(${convertType(url)});`);
|
|
27
|
-
if (supportedMethods.includes(method.toUpperCase())) {
|
|
28
|
-
push(`$request->setMethod(HTTP_METH_${method.toUpperCase()});`);
|
|
29
|
-
} else {
|
|
30
|
-
push(
|
|
31
|
-
`$request->setMethod(HttpRequest::HTTP_METH_${method.toUpperCase()});`
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
blank();
|
|
35
|
-
if (Object.keys(queryObj).length) {
|
|
36
|
-
push(`$request->setQueryData(${convertType(queryObj, indent)});`);
|
|
37
|
-
blank();
|
|
38
|
-
}
|
|
39
|
-
if (Object.keys(headersObj).length) {
|
|
40
|
-
push(`$request->setHeaders(${convertType(headersObj, indent)});`);
|
|
41
|
-
blank();
|
|
42
|
-
}
|
|
43
|
-
if (Object.keys(cookiesObj).length) {
|
|
44
|
-
push(`$request->setCookies(${convertType(cookiesObj, indent)});`);
|
|
45
|
-
blank();
|
|
46
|
-
}
|
|
47
|
-
switch (postData === null || postData === void 0 ? void 0 : postData.mimeType) {
|
|
48
|
-
case "application/x-www-form-urlencoded":
|
|
49
|
-
push(`$request->setContentType(${convertType(postData.mimeType)});`);
|
|
50
|
-
push(
|
|
51
|
-
`$request->setPostFields(${convertType(postData.paramsObj, indent)});`
|
|
52
|
-
);
|
|
53
|
-
blank();
|
|
54
|
-
break;
|
|
55
|
-
case "application/json":
|
|
56
|
-
push(`$request->setContentType(${convertType(postData.mimeType)});`);
|
|
57
|
-
push(
|
|
58
|
-
`$request->setBody(json_encode(${convertType(postData.jsonObj, indent)}));`
|
|
59
|
-
);
|
|
60
|
-
blank();
|
|
61
|
-
break;
|
|
62
|
-
default:
|
|
63
|
-
if (postData === null || postData === void 0 ? void 0 : postData.text) {
|
|
64
|
-
push(`$request->setBody(${convertType(postData.text)});`);
|
|
65
|
-
blank();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
push("try {");
|
|
69
|
-
push("$response = $request->send();", 1);
|
|
70
|
-
blank();
|
|
71
|
-
push("echo $response->getBody();", 1);
|
|
72
|
-
push("} catch (HttpException $ex) {");
|
|
73
|
-
push("echo $ex;", 1);
|
|
74
|
-
push("}");
|
|
75
|
-
if (!noTags && closingTag) {
|
|
76
|
-
blank();
|
|
77
|
-
push("?>");
|
|
78
|
-
}
|
|
79
|
-
return join();
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
export {
|
|
83
|
-
http1
|
|
84
|
-
};
|
|
85
|
-
//# sourceMappingURL=client.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/php/http1/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for PHP using curl-ext.\n *\n * @author\n * @AhmadNassri\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 { convertType, supportedMethods } from '../helpers.js'\n\nexport const http1 = {\n info: {\n key: 'http1',\n title: 'HTTP v1',\n link: 'http://php.net/manual/en/book.http.php',\n description: 'PHP with pecl/http v1',\n },\n convert: (\n { method, url, postData, queryObj, headersObj, cookiesObj },\n options = {},\n ) => {\n const {\n closingTag = false,\n indent = ' ',\n noTags = false,\n shortTags = false,\n } = options\n const { push, blank, join } = new CodeBuilder({ indent })\n if (!noTags) {\n push(shortTags ? '<?' : '<?php')\n blank()\n }\n if (!supportedMethods.includes(method.toUpperCase())) {\n push(`HttpRequest::methodRegister('${method}');`)\n }\n push('$request = new HttpRequest();')\n push(`$request->setUrl(${convertType(url)});`)\n if (supportedMethods.includes(method.toUpperCase())) {\n push(`$request->setMethod(HTTP_METH_${method.toUpperCase()});`)\n } else {\n push(\n `$request->setMethod(HttpRequest::HTTP_METH_${method.toUpperCase()});`,\n )\n }\n blank()\n if (Object.keys(queryObj).length) {\n push(`$request->setQueryData(${convertType(queryObj, indent)});`)\n blank()\n }\n if (Object.keys(headersObj).length) {\n push(`$request->setHeaders(${convertType(headersObj, indent)});`)\n blank()\n }\n if (Object.keys(cookiesObj).length) {\n push(`$request->setCookies(${convertType(cookiesObj, indent)});`)\n blank()\n }\n switch (\n postData === null || postData === void 0 ? void 0 : postData.mimeType\n ) {\n case 'application/x-www-form-urlencoded':\n push(`$request->setContentType(${convertType(postData.mimeType)});`)\n push(\n `$request->setPostFields(${convertType(postData.paramsObj, indent)});`,\n )\n blank()\n break\n case 'application/json':\n push(`$request->setContentType(${convertType(postData.mimeType)});`)\n push(\n `$request->setBody(json_encode(${convertType(postData.jsonObj, indent)}));`,\n )\n blank()\n break\n default:\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(`$request->setBody(${convertType(postData.text)});`)\n blank()\n }\n }\n push('try {')\n push('$response = $request->send();', 1)\n blank()\n push('echo $response->getBody();', 1)\n push('} catch (HttpException $ex) {')\n push('echo $ex;', 1)\n push('}')\n if (!noTags && closingTag) {\n blank()\n push('?>')\n }\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B,SAAS,aAAa,wBAAwB;AAEvC,MAAM,QAAQ;AAAA,EACnB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CACP,EAAE,QAAQ,KAAK,UAAU,UAAU,YAAY,WAAW,GAC1D,UAAU,CAAC,MACR;AACH,UAAM;AAAA,MACJ,aAAa;AAAA,MACb,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY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ACF;AACE,YAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,eAAK,qBAAqB,YAAY,SAAS,IAAI,CAAC,IAAI;AACxD,gBAAM;AAAA,QACR;AAAA,IACJ;AACA,SAAK,OAAO;AACZ,SAAK,iCAAiC,CAAC;AACvC,UAAM;AACN,SAAK,8BAA8B,CAAC;AACpC,SAAK,+BAA+B;AACpC,SAAK,aAAa,CAAC;AACnB,SAAK,GAAG;AACR,QAAI,CAAC,UAAU,YAAY;AACzB,YAAM;AACN,WAAK,IAAI;AAAA,IACX;AACA,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const http2: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ postData, headersObj, method, queryObj, cookiesObj, url }: {
|
|
9
|
-
postData: any;
|
|
10
|
-
headersObj: any;
|
|
11
|
-
method: any;
|
|
12
|
-
queryObj: any;
|
|
13
|
-
cookiesObj: any;
|
|
14
|
-
url: any;
|
|
15
|
-
}, options?: {}) => 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/php/http2/client.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;CAgIjB,CAAA"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { CodeBuilder } from "../../../helpers/code-builder.js";
|
|
2
|
-
import {
|
|
3
|
-
getHeader,
|
|
4
|
-
getHeaderName,
|
|
5
|
-
hasHeader
|
|
6
|
-
} from "../../../helpers/headers.js";
|
|
7
|
-
import { convertType } from "../helpers.js";
|
|
8
|
-
const http2 = {
|
|
9
|
-
info: {
|
|
10
|
-
key: "http2",
|
|
11
|
-
title: "HTTP v2",
|
|
12
|
-
link: "http://devel-m6w6.rhcloud.com/mdref/http",
|
|
13
|
-
description: "PHP with pecl/http v2"
|
|
14
|
-
},
|
|
15
|
-
convert: ({ postData, headersObj, method, queryObj, cookiesObj, url }, options = {}) => {
|
|
16
|
-
let _a;
|
|
17
|
-
const {
|
|
18
|
-
closingTag = false,
|
|
19
|
-
indent = " ",
|
|
20
|
-
noTags = false,
|
|
21
|
-
shortTags = false
|
|
22
|
-
} = options;
|
|
23
|
-
const { push, blank, join } = new CodeBuilder({ indent });
|
|
24
|
-
let hasBody = false;
|
|
25
|
-
if (!noTags) {
|
|
26
|
-
push(shortTags ? "<?" : "<?php");
|
|
27
|
-
blank();
|
|
28
|
-
}
|
|
29
|
-
push("$client = new http\\Client;");
|
|
30
|
-
push("$request = new http\\Client\\Request;");
|
|
31
|
-
blank();
|
|
32
|
-
switch (postData === null || postData === void 0 ? void 0 : postData.mimeType) {
|
|
33
|
-
case "application/x-www-form-urlencoded":
|
|
34
|
-
push("$body = new http\\Message\\Body;");
|
|
35
|
-
push(
|
|
36
|
-
`$body->append(new http\\QueryString(${convertType(postData.paramsObj, indent)}));`
|
|
37
|
-
);
|
|
38
|
-
blank();
|
|
39
|
-
hasBody = true;
|
|
40
|
-
break;
|
|
41
|
-
case "multipart/form-data": {
|
|
42
|
-
if (!postData.params) {
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
const files = [];
|
|
46
|
-
const fields = {};
|
|
47
|
-
postData.params.forEach(({ name, fileName, value, contentType }) => {
|
|
48
|
-
if (fileName) {
|
|
49
|
-
files.push({
|
|
50
|
-
name,
|
|
51
|
-
type: contentType,
|
|
52
|
-
file: fileName,
|
|
53
|
-
data: value
|
|
54
|
-
});
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
if (value) {
|
|
58
|
-
fields[name] = value;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
const field = Object.keys(fields).length ? convertType(fields, indent) : "null";
|
|
62
|
-
const formValue = files.length ? convertType(files, indent) : "null";
|
|
63
|
-
push("$body = new http\\Message\\Body;");
|
|
64
|
-
push(`$body->addForm(${field}, ${formValue});`);
|
|
65
|
-
if (hasHeader(headersObj, "content-type")) {
|
|
66
|
-
if ((_a = getHeader(headersObj, "content-type")) === null || _a === void 0 ? void 0 : _a.indexOf("boundary")) {
|
|
67
|
-
const headerName = getHeaderName(headersObj, "content-type");
|
|
68
|
-
if (headerName) {
|
|
69
|
-
delete headersObj[headerName];
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
blank();
|
|
74
|
-
hasBody = true;
|
|
75
|
-
break;
|
|
76
|
-
}
|
|
77
|
-
case "application/json":
|
|
78
|
-
push("$body = new http\\Message\\Body;");
|
|
79
|
-
push(
|
|
80
|
-
`$body->append(json_encode(${convertType(postData.jsonObj, indent)}));`
|
|
81
|
-
);
|
|
82
|
-
hasBody = true;
|
|
83
|
-
break;
|
|
84
|
-
default:
|
|
85
|
-
if (postData === null || postData === void 0 ? void 0 : postData.text) {
|
|
86
|
-
push("$body = new http\\Message\\Body;");
|
|
87
|
-
push(`$body->append(${convertType(postData.text)});`);
|
|
88
|
-
blank();
|
|
89
|
-
hasBody = true;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
push(`$request->setRequestUrl(${convertType(url)});`);
|
|
93
|
-
push(`$request->setRequestMethod(${convertType(method)});`);
|
|
94
|
-
if (hasBody) {
|
|
95
|
-
push("$request->setBody($body);");
|
|
96
|
-
blank();
|
|
97
|
-
}
|
|
98
|
-
if (Object.keys(queryObj).length) {
|
|
99
|
-
push(
|
|
100
|
-
`$request->setQuery(new http\\QueryString(${convertType(queryObj, indent)}));`
|
|
101
|
-
);
|
|
102
|
-
blank();
|
|
103
|
-
}
|
|
104
|
-
if (Object.keys(headersObj).length) {
|
|
105
|
-
push(`$request->setHeaders(${convertType(headersObj, indent)});`);
|
|
106
|
-
blank();
|
|
107
|
-
}
|
|
108
|
-
if (Object.keys(cookiesObj).length) {
|
|
109
|
-
blank();
|
|
110
|
-
push(`$client->setCookies(${convertType(cookiesObj, indent)});`);
|
|
111
|
-
blank();
|
|
112
|
-
}
|
|
113
|
-
push("$client->enqueue($request)->send();");
|
|
114
|
-
push("$response = $client->getResponse();");
|
|
115
|
-
blank();
|
|
116
|
-
push("echo $response->getBody();");
|
|
117
|
-
if (!noTags && closingTag) {
|
|
118
|
-
blank();
|
|
119
|
-
push("?>");
|
|
120
|
-
}
|
|
121
|
-
return join();
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
export {
|
|
125
|
-
http2
|
|
126
|
-
};
|
|
127
|
-
//# sourceMappingURL=client.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/php/http2/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for PHP using curl-ext.\n *\n * @author\n * @AhmadNassri\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 {\n getHeader,\n getHeaderName,\n hasHeader,\n} from '../../../helpers/headers.js'\nimport { convertType } from '../helpers.js'\n\nexport const http2 = {\n info: {\n key: 'http2',\n title: 'HTTP v2',\n link: 'http://devel-m6w6.rhcloud.com/mdref/http',\n description: 'PHP with pecl/http v2',\n },\n convert: (\n { postData, headersObj, method, queryObj, cookiesObj, url },\n options = {},\n ) => {\n let _a\n const {\n closingTag = false,\n indent = ' ',\n noTags = false,\n shortTags = false,\n } = options\n const { push, blank, join } = new CodeBuilder({ indent })\n let hasBody = false\n if (!noTags) {\n push(shortTags ? '<?' : '<?php')\n blank()\n }\n push('$client = new http\\\\Client;')\n push('$request = new http\\\\Client\\\\Request;')\n blank()\n switch (\n postData === null || postData === void 0 ? void 0 : postData.mimeType\n ) {\n case 'application/x-www-form-urlencoded':\n push('$body = new http\\\\Message\\\\Body;')\n push(\n `$body->append(new http\\\\QueryString(${convertType(postData.paramsObj, indent)}));`,\n )\n blank()\n hasBody = true\n break\n case 'multipart/form-data': {\n if (!postData.params) {\n break\n }\n const files = []\n const fields = {}\n postData.params.forEach(({ name, fileName, value, contentType }) => {\n if (fileName) {\n files.push({\n name,\n type: contentType,\n file: fileName,\n data: value,\n })\n return\n }\n if (value) {\n fields[name] = value\n }\n })\n const field = Object.keys(fields).length\n ? convertType(fields, indent)\n : 'null'\n const formValue = files.length ? convertType(files, indent) : 'null'\n push('$body = new http\\\\Message\\\\Body;')\n push(`$body->addForm(${field}, ${formValue});`)\n // remove the contentType header\n if (hasHeader(headersObj, 'content-type')) {\n if (\n (_a = getHeader(headersObj, 'content-type')) === null ||\n _a === void 0\n ? void 0\n : _a.indexOf('boundary')\n ) {\n const headerName = getHeaderName(headersObj, 'content-type')\n if (headerName) {\n delete headersObj[headerName]\n }\n }\n }\n blank()\n hasBody = true\n break\n }\n case 'application/json':\n push('$body = new http\\\\Message\\\\Body;')\n push(\n `$body->append(json_encode(${convertType(postData.jsonObj, indent)}));`,\n )\n hasBody = true\n break\n default:\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push('$body = new http\\\\Message\\\\Body;')\n push(`$body->append(${convertType(postData.text)});`)\n blank()\n hasBody = true\n }\n }\n push(`$request->setRequestUrl(${convertType(url)});`)\n push(`$request->setRequestMethod(${convertType(method)});`)\n if (hasBody) {\n push('$request->setBody($body);')\n blank()\n }\n if (Object.keys(queryObj).length) {\n push(\n `$request->setQuery(new http\\\\QueryString(${convertType(queryObj, indent)}));`,\n )\n blank()\n }\n if (Object.keys(headersObj).length) {\n push(`$request->setHeaders(${convertType(headersObj, indent)});`)\n blank()\n }\n if (Object.keys(cookiesObj).length) {\n blank()\n push(`$client->setCookies(${convertType(cookiesObj, indent)});`)\n blank()\n }\n push('$client->enqueue($request)->send();')\n push('$response = $client->getResponse();')\n blank()\n push('echo $response->getBody();')\n if (!noTags && closingTag) {\n blank()\n push('?>')\n }\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAErB,MAAM,QAAQ;AAAA,EACnB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CACP,EAAE,UAAU,YAAY,QAAQ,UAAU,YAAY,IAAI,GAC1D,UAAU,CAAC,MACR;AACH,QAAI;AACJ,UAAM;AAAA,MACJ,aAAa;AAAA,MACb,SAAS;AAAA,MACT,SAAS;AAAA,MACT,YAAY;AAAA,IACd,IAAI;AACJ,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY,EAAE,OAAO,CAAC;AACxD,QAAI,UAAU;AACd,QAAI,CAAC,QAAQ;AACX,WAAK,YAAY,OAAO,OAAO;AAC/B,YAAM;AAAA,IACR;AACA,SAAK,6BAA6B;AAClC,SAAK,uCAAuC;AAC5C,UAAM;AACN,YACE,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,UAC7D;AAAA,MACA,KAAK;AACH,aAAK,kCAAkC;AACvC;AAAA,UACE,uCAAuC,YAAY,SAAS,WAAW,MAAM,CAAC;AAAA,QAChF;AACA,cAAM;AACN,kBAAU;AACV;AAAA,MACF,KAAK,uBAAuB;AAC1B,YAAI,CAAC,SAAS,QAAQ;AACpB;AAAA,QACF;AACA,cAAM,QAAQ,CAAC;AACf,cAAM,SAAS,CAAC;AAChB,iBAAS,OAAO,QAAQ,CAAC,EAAE,MAAM,UAAU,OAAO,YAAY,MAAM;AAClE,cAAI,UAAU;AACZ,kBAAM,KAAK;AAAA,cACT;AAAA,cACA,MAAM;AAAA,cACN,MAAM;AA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AwB,YAAY,YAAY,MAAM,CAAC,IAAI;AAChE,YAAM;AAAA,IACR;AACA,QAAI,OAAO,KAAK,UAAU,EAAE,QAAQ;AAClC,YAAM;AACN,WAAK,uBAAuB,YAAY,YAAY,MAAM,CAAC,IAAI;AAC/D,YAAM;AAAA,IACR;AACA,SAAK,qCAAqC;AAC1C,SAAK,qCAAqC;AAC1C,UAAM;AACN,SAAK,4BAA4B;AACjC,QAAI,CAAC,UAAU,YAAY;AACzB,YAAM;AACN,WAAK,IAAI;AAAA,IACX;AACA,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const php: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
curl: any;
|
|
10
|
-
guzzle: any;
|
|
11
|
-
http1: {
|
|
12
|
-
info: {
|
|
13
|
-
key: string;
|
|
14
|
-
title: string;
|
|
15
|
-
link: string;
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
18
|
-
convert: ({ method, url, postData, queryObj, headersObj, cookiesObj }: {
|
|
19
|
-
method: any;
|
|
20
|
-
url: any;
|
|
21
|
-
postData: any;
|
|
22
|
-
queryObj: any;
|
|
23
|
-
headersObj: any;
|
|
24
|
-
cookiesObj: any;
|
|
25
|
-
}, options?: {}) => any;
|
|
26
|
-
};
|
|
27
|
-
http2: {
|
|
28
|
-
info: {
|
|
29
|
-
key: string;
|
|
30
|
-
title: string;
|
|
31
|
-
link: string;
|
|
32
|
-
description: string;
|
|
33
|
-
};
|
|
34
|
-
convert: ({ postData, headersObj, method, queryObj, cookiesObj, url }: {
|
|
35
|
-
postData: any;
|
|
36
|
-
headersObj: any;
|
|
37
|
-
method: any;
|
|
38
|
-
queryObj: any;
|
|
39
|
-
cookiesObj: any;
|
|
40
|
-
url: any;
|
|
41
|
-
}, options?: {}) => any;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/php/target.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAaf,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { curl } from "./curl/client.js";
|
|
2
|
-
import { guzzle } from "./guzzle/client.js";
|
|
3
|
-
import { http1 } from "./http1/client.js";
|
|
4
|
-
import { http2 } from "./http2/client.js";
|
|
5
|
-
const php = {
|
|
6
|
-
info: {
|
|
7
|
-
key: "php",
|
|
8
|
-
title: "PHP",
|
|
9
|
-
extname: ".php",
|
|
10
|
-
default: "curl"
|
|
11
|
-
},
|
|
12
|
-
clientsById: {
|
|
13
|
-
curl,
|
|
14
|
-
guzzle,
|
|
15
|
-
http1,
|
|
16
|
-
http2
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export {
|
|
20
|
-
php
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=target.js.map
|