@readme/httpsnippet 4.0.2 → 4.0.3
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/helpers/code-builder.d.ts +49 -0
- package/dist/{src/helpers → helpers}/code-builder.js +0 -0
- package/dist/helpers/form-data.d.ts +30 -0
- package/dist/{src/helpers → helpers}/form-data.js +0 -0
- package/dist/helpers/har-validator.d.ts +9 -0
- package/dist/{src/helpers → helpers}/har-validator.js +0 -0
- package/dist/helpers/headers.d.ts +18 -0
- package/dist/{src/helpers → helpers}/headers.js +0 -0
- package/dist/helpers/reducer.d.ts +5 -0
- package/dist/{src/helpers → helpers}/reducer.js +0 -0
- package/dist/helpers/shell.d.ts +6 -0
- package/dist/{src/helpers → helpers}/shell.js +0 -0
- package/dist/helpers/utils.d.ts +6 -0
- package/dist/{src/helpers → helpers}/utils.js +0 -0
- package/dist/index.d.ts +95 -0
- package/dist/{src/index.js → index.js} +0 -0
- package/dist/targets/c/libcurl/client.d.ts +2 -0
- package/dist/{src/targets → targets}/c/libcurl/client.js +0 -0
- package/dist/targets/c/target.d.ts +2 -0
- package/dist/{src/targets → targets}/c/target.js +0 -0
- package/dist/targets/clojure/clj_http/client.d.ts +11 -0
- package/dist/{src/targets → targets}/clojure/clj_http/client.js +0 -0
- package/dist/targets/clojure/target.d.ts +2 -0
- package/dist/{src/targets → targets}/clojure/target.js +0 -0
- package/dist/targets/csharp/httpclient/client.d.ts +2 -0
- package/dist/{src/targets → targets}/csharp/httpclient/client.js +0 -0
- package/dist/targets/csharp/restsharp/client.d.ts +2 -0
- package/dist/{src/targets → targets}/csharp/restsharp/client.js +0 -0
- package/dist/targets/csharp/target.d.ts +2 -0
- package/dist/{src/targets → targets}/csharp/target.js +0 -0
- package/dist/targets/go/native/client.d.ts +17 -0
- package/dist/{src/targets → targets}/go/native/client.js +0 -0
- package/dist/targets/go/target.d.ts +2 -0
- package/dist/{src/targets → targets}/go/target.js +0 -0
- package/dist/targets/http/http1.1/client.d.ts +23 -0
- package/dist/{src/targets → targets}/http/http1.1/client.js +0 -0
- package/dist/targets/http/target.d.ts +2 -0
- package/dist/{src/targets → targets}/http/target.js +0 -0
- package/dist/targets/java/asynchttp/client.d.ts +11 -0
- package/dist/{src/targets → targets}/java/asynchttp/client.js +0 -0
- package/dist/targets/java/nethttp/client.d.ts +14 -0
- package/dist/{src/targets → targets}/java/nethttp/client.js +0 -0
- package/dist/targets/java/okhttp/client.d.ts +11 -0
- package/dist/{src/targets → targets}/java/okhttp/client.js +0 -0
- package/dist/targets/java/target.d.ts +2 -0
- package/dist/{src/targets → targets}/java/target.js +0 -0
- package/dist/targets/java/unirest/client.d.ts +11 -0
- package/dist/{src/targets → targets}/java/unirest/client.js +0 -0
- package/dist/targets/javascript/axios/client.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/axios/client.js +0 -0
- package/dist/targets/javascript/axios/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/javascript/axios/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/application-json.js +0 -0
- package/dist/targets/javascript/axios/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/cookies.js +0 -0
- package/dist/targets/javascript/axios/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/custom-method.js +0 -0
- package/dist/targets/javascript/axios/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/full.js +0 -0
- package/dist/targets/javascript/axios/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/headers.js +0 -0
- package/dist/targets/javascript/axios/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/http-insecure.js +0 -0
- package/dist/targets/javascript/axios/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/javascript/axios/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/javascript/axios/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/multipart-data.js +0 -0
- package/dist/targets/javascript/axios/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/multipart-file.js +0 -0
- package/dist/targets/javascript/axios/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/javascript/axios/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/javascript/axios/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/nested.js +0 -0
- package/dist/targets/javascript/axios/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/query-encoded.js +0 -0
- package/dist/targets/javascript/axios/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/query.js +0 -0
- package/dist/targets/javascript/axios/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/short.js +0 -0
- package/dist/targets/javascript/axios/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/axios/fixtures/text-plain.js +0 -0
- package/dist/targets/javascript/fetch/client.d.ts +15 -0
- package/dist/{src/targets → targets}/javascript/fetch/client.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/application-form-encoded.d.ts +8 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/application-json.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/application-json.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/cookies.d.ts +6 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/cookies.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/custom-method.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/custom-method.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/full.d.ts +10 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/full.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/headers.d.ts +8 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/headers.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/http-insecure.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/http-insecure.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/jsonObj-multiline.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/jsonObj-null-value.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/multipart-data.d.ts +4 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/multipart-data.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/multipart-file.d.ts +4 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/multipart-file.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/multipart-form-data-no-params.d.ts +6 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/multipart-form-data.d.ts +4 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/nested.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/nested.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/query-encoded.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/query-encoded.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/query.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/query.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/short.d.ts +3 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/short.js +0 -0
- package/dist/targets/javascript/fetch/fixtures/text-plain.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/fetch/fixtures/text-plain.js +0 -0
- package/dist/targets/javascript/jquery/client.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/jquery/client.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/application-form-encoded.d.ts +13 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/application-json.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/application-json.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/cookies.d.ts +9 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/cookies.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/custom-method.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/custom-method.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/full.d.ts +14 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/full.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/headers.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/headers.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/http-insecure.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/http-insecure.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/jsonObj-multiline.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/jsonObj-null-value.d.ts +11 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/multipart-data.d.ts +12 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/multipart-data.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/multipart-file.d.ts +12 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/multipart-file.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/multipart-form-data-no-params.d.ts +9 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/multipart-form-data.d.ts +12 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/nested.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/nested.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/query-encoded.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/query-encoded.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/query.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/query.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/short.d.ts +7 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/short.js +0 -0
- package/dist/targets/javascript/jquery/fixtures/text-plain.d.ts +10 -0
- package/dist/{src/targets → targets}/javascript/jquery/fixtures/text-plain.js +0 -0
- package/dist/targets/javascript/target.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/target.js +0 -0
- package/dist/targets/javascript/xhr/client.d.ts +14 -0
- package/dist/{src/targets → targets}/javascript/xhr/client.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/application-form-encoded.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/application-json.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/application-json.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/cookies.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/cookies.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/cors.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/cors.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/custom-method.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/custom-method.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/full.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/full.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/headers.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/headers.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/http-insecure.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/http-insecure.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/jsonObj-multiline.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/jsonObj-null-value.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/multipart-data.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/multipart-data.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/multipart-file.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/multipart-file.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/multipart-form-data.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/nested.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/nested.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/query-encoded.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/query-encoded.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/query.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/query.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/short.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/short.js +0 -0
- package/dist/targets/javascript/xhr/fixtures/text-plain.d.ts +2 -0
- package/dist/{src/targets → targets}/javascript/xhr/fixtures/text-plain.js +0 -0
- package/dist/targets/kotlin/okhttp/client.d.ts +11 -0
- package/dist/{src/targets → targets}/kotlin/okhttp/client.js +0 -0
- package/dist/targets/kotlin/target.d.ts +2 -0
- package/dist/{src/targets → targets}/kotlin/target.js +0 -0
- package/dist/targets/node/axios/client.d.ts +11 -0
- package/dist/{src/targets → targets}/node/axios/client.js +0 -0
- package/dist/targets/node/axios/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/node/axios/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/application-json.js +0 -0
- package/dist/targets/node/axios/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/cookies.js +0 -0
- package/dist/targets/node/axios/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/custom-method.js +0 -0
- package/dist/targets/node/axios/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/full.js +0 -0
- package/dist/targets/node/axios/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/headers.js +0 -0
- package/dist/targets/node/axios/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/http-insecure.js +0 -0
- package/dist/targets/node/axios/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/node/axios/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/node/axios/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/multipart-data.js +0 -0
- package/dist/targets/node/axios/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/multipart-file.js +0 -0
- package/dist/targets/node/axios/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/node/axios/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/node/axios/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/nested.js +0 -0
- package/dist/targets/node/axios/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/query-encoded.js +0 -0
- package/dist/targets/node/axios/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/query.js +0 -0
- package/dist/targets/node/axios/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/short.js +0 -0
- package/dist/targets/node/axios/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/node/axios/fixtures/text-plain.js +0 -0
- package/dist/targets/node/fetch/client.d.ts +11 -0
- package/dist/{src/targets → targets}/node/fetch/client.js +0 -0
- package/dist/targets/node/fetch/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/node/fetch/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/application-json.js +0 -0
- package/dist/targets/node/fetch/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/cookies.js +0 -0
- package/dist/targets/node/fetch/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/custom-method.js +0 -0
- package/dist/targets/node/fetch/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/full.js +0 -0
- package/dist/targets/node/fetch/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/headers.js +0 -0
- package/dist/targets/node/fetch/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/http-insecure.js +0 -0
- package/dist/targets/node/fetch/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/node/fetch/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/node/fetch/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/multipart-data.js +0 -0
- package/dist/targets/node/fetch/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/multipart-file.js +0 -0
- package/dist/targets/node/fetch/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/node/fetch/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/node/fetch/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/nested.js +0 -0
- package/dist/targets/node/fetch/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/query-encoded.js +0 -0
- package/dist/targets/node/fetch/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/query.js +0 -0
- package/dist/targets/node/fetch/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/short.js +0 -0
- package/dist/targets/node/fetch/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/node/fetch/fixtures/text-plain.js +0 -0
- package/dist/targets/node/native/client.d.ts +11 -0
- package/dist/{src/targets → targets}/node/native/client.js +0 -0
- package/dist/targets/node/native/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/node/native/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/application-json.js +0 -0
- package/dist/targets/node/native/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/cookies.js +0 -0
- package/dist/targets/node/native/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/custom-method.js +0 -0
- package/dist/targets/node/native/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/full.js +0 -0
- package/dist/targets/node/native/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/headers.js +0 -0
- package/dist/targets/node/native/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/http-insecure.js +0 -0
- package/dist/targets/node/native/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/node/native/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/node/native/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/multipart-data.js +0 -0
- package/dist/targets/node/native/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/multipart-file.js +0 -0
- package/dist/targets/node/native/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/node/native/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/node/native/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/nested.js +0 -0
- package/dist/targets/node/native/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/query-encoded.js +0 -0
- package/dist/targets/node/native/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/query.js +0 -0
- package/dist/targets/node/native/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/short.js +0 -0
- package/dist/targets/node/native/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/node/native/fixtures/text-plain.js +0 -0
- package/dist/targets/node/request/client.d.ts +11 -0
- package/dist/{src/targets → targets}/node/request/client.js +0 -0
- package/dist/targets/node/request/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/node/request/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/application-json.js +0 -0
- package/dist/targets/node/request/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/cookies.js +0 -0
- package/dist/targets/node/request/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/custom-method.js +0 -0
- package/dist/targets/node/request/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/full.js +0 -0
- package/dist/targets/node/request/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/headers.js +0 -0
- package/dist/targets/node/request/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/http-insecure.js +0 -0
- package/dist/targets/node/request/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/node/request/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/node/request/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/multipart-data.js +0 -0
- package/dist/targets/node/request/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/multipart-file.js +0 -0
- package/dist/targets/node/request/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/node/request/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/node/request/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/nested.js +0 -0
- package/dist/targets/node/request/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/query-encoded.js +0 -0
- package/dist/targets/node/request/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/query.js +0 -0
- package/dist/targets/node/request/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/short.js +0 -0
- package/dist/targets/node/request/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/node/request/fixtures/text-plain.js +0 -0
- package/dist/targets/node/target.d.ts +2 -0
- package/dist/{src/targets → targets}/node/target.js +0 -0
- package/dist/targets/node/unirest/client.d.ts +11 -0
- package/dist/{src/targets → targets}/node/unirest/client.js +0 -0
- package/dist/targets/node/unirest/fixtures/application-form-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/application-form-encoded.js +0 -0
- package/dist/targets/node/unirest/fixtures/application-json.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/application-json.js +0 -0
- package/dist/targets/node/unirest/fixtures/cookies.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/cookies.js +0 -0
- package/dist/targets/node/unirest/fixtures/custom-method.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/custom-method.js +0 -0
- package/dist/targets/node/unirest/fixtures/full.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/full.js +0 -0
- package/dist/targets/node/unirest/fixtures/headers.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/headers.js +0 -0
- package/dist/targets/node/unirest/fixtures/http-insecure.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/http-insecure.js +0 -0
- package/dist/targets/node/unirest/fixtures/jsonObj-multiline.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/jsonObj-multiline.js +0 -0
- package/dist/targets/node/unirest/fixtures/jsonObj-null-value.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/jsonObj-null-value.js +0 -0
- package/dist/targets/node/unirest/fixtures/multipart-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/multipart-data.js +0 -0
- package/dist/targets/node/unirest/fixtures/multipart-file.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/multipart-file.js +0 -0
- package/dist/targets/node/unirest/fixtures/multipart-form-data-no-params.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/multipart-form-data-no-params.js +0 -0
- package/dist/targets/node/unirest/fixtures/multipart-form-data.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/multipart-form-data.js +0 -0
- package/dist/targets/node/unirest/fixtures/nested.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/nested.js +0 -0
- package/dist/targets/node/unirest/fixtures/query-encoded.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/query-encoded.js +0 -0
- package/dist/targets/node/unirest/fixtures/query.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/query.js +0 -0
- package/dist/targets/node/unirest/fixtures/short.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/short.js +0 -0
- package/dist/targets/node/unirest/fixtures/text-plain.d.ts +1 -0
- package/dist/{src/targets → targets}/node/unirest/fixtures/text-plain.js +0 -0
- package/dist/targets/objc/helpers.d.ts +26 -0
- package/dist/{src/targets → targets}/objc/helpers.js +0 -0
- package/dist/targets/objc/nsurlsession/client.d.ts +15 -0
- package/dist/{src/targets → targets}/objc/nsurlsession/client.js +0 -0
- package/dist/targets/objc/target.d.ts +2 -0
- package/dist/{src/targets → targets}/objc/target.js +0 -0
- package/dist/targets/ocaml/cohttp/client.d.ts +11 -0
- package/dist/{src/targets → targets}/ocaml/cohttp/client.js +0 -0
- package/dist/targets/ocaml/target.d.ts +2 -0
- package/dist/{src/targets → targets}/ocaml/target.js +0 -0
- package/dist/targets/php/curl/client.d.ts +19 -0
- package/dist/{src/targets → targets}/php/curl/client.js +0 -0
- package/dist/targets/php/guzzle/client.d.ts +17 -0
- package/dist/{src/targets → targets}/php/guzzle/client.js +0 -0
- package/dist/targets/php/helpers.d.ts +2 -0
- package/dist/{src/targets → targets}/php/helpers.js +0 -0
- package/dist/targets/php/http1/client.d.ts +16 -0
- package/dist/{src/targets → targets}/php/http1/client.js +0 -0
- package/dist/targets/php/http2/client.d.ts +16 -0
- package/dist/{src/targets → targets}/php/http2/client.js +0 -0
- package/dist/targets/php/target.d.ts +2 -0
- package/dist/{src/targets → targets}/php/target.js +0 -0
- package/dist/targets/powershell/common.d.ts +3 -0
- package/dist/{src/targets → targets}/powershell/common.js +0 -0
- package/dist/targets/powershell/restmethod/client.d.ts +2 -0
- package/dist/{src/targets → targets}/powershell/restmethod/client.js +0 -0
- package/dist/targets/powershell/target.d.ts +2 -0
- package/dist/{src/targets → targets}/powershell/target.js +0 -0
- package/dist/targets/powershell/webrequest/client.d.ts +2 -0
- package/dist/{src/targets → targets}/powershell/webrequest/client.js +0 -0
- package/dist/targets/python/helpers.d.ts +8 -0
- package/dist/{src/targets → targets}/python/helpers.js +0 -0
- package/dist/targets/python/requests/client.d.ts +14 -0
- package/dist/{src/targets → targets}/python/requests/client.js +0 -0
- package/dist/targets/python/target.d.ts +2 -0
- package/dist/{src/targets → targets}/python/target.js +0 -0
- package/dist/targets/r/httr/client.d.ts +11 -0
- package/dist/{src/targets → targets}/r/httr/client.js +0 -0
- package/dist/targets/r/target.d.ts +2 -0
- package/dist/{src/targets → targets}/r/target.js +0 -0
- package/dist/targets/ruby/native/client.d.ts +2 -0
- package/dist/{src/targets → targets}/ruby/native/client.js +0 -0
- package/dist/targets/ruby/target.d.ts +2 -0
- package/dist/{src/targets → targets}/ruby/target.js +0 -0
- package/dist/targets/shell/curl/client.d.ts +19 -0
- package/dist/{src/targets → targets}/shell/curl/client.js +0 -0
- package/dist/targets/shell/httpie/client.d.ts +24 -0
- package/dist/{src/targets → targets}/shell/httpie/client.js +0 -0
- package/dist/targets/shell/target.d.ts +2 -0
- package/dist/{src/targets → targets}/shell/target.js +0 -0
- package/dist/targets/shell/wget/client.d.ts +16 -0
- package/dist/{src/targets → targets}/shell/wget/client.js +0 -0
- package/dist/targets/swift/helpers.d.ts +16 -0
- package/dist/{src/targets → targets}/swift/helpers.js +0 -0
- package/dist/targets/swift/nsurlsession/client.d.ts +15 -0
- package/dist/{src/targets → targets}/swift/nsurlsession/client.js +0 -0
- package/dist/targets/swift/target.d.ts +2 -0
- package/dist/{src/targets → targets}/swift/target.js +0 -0
- package/dist/targets/targets.d.ts +52 -0
- package/dist/{src/targets → targets}/targets.js +0 -0
- package/package.json +2 -2
- package/dist/package.json +0 -86
- package/dist/src/fixtures/customTarget.js +0 -15
- package/dist/src/fixtures/mimetypes.js +0 -77
- package/dist/src/fixtures/requests/application-form-encoded.js +0 -69
- package/dist/src/fixtures/requests/application-json.js +0 -72
- package/dist/src/fixtures/requests/cookies.js +0 -51
- package/dist/src/fixtures/requests/custom-method.js +0 -41
- package/dist/src/fixtures/requests/full.js +0 -99
- package/dist/src/fixtures/requests/headers.js +0 -56
- package/dist/src/fixtures/requests/http-insecure.js +0 -45
- package/dist/src/fixtures/requests/jsonObj-multiline.js +0 -59
- package/dist/src/fixtures/requests/jsonObj-null-value.js +0 -61
- package/dist/src/fixtures/requests/multipart-data.js +0 -72
- package/dist/src/fixtures/requests/multipart-file.js +0 -65
- package/dist/src/fixtures/requests/multipart-form-data-no-params.js +0 -56
- package/dist/src/fixtures/requests/multipart-form-data.js +0 -64
- package/dist/src/fixtures/requests/nested.js +0 -64
- package/dist/src/fixtures/requests/query-encoded.js +0 -59
- package/dist/src/fixtures/requests/query.js +0 -64
- package/dist/src/fixtures/requests/short.js +0 -45
- package/dist/src/fixtures/requests/text-plain.js +0 -57
- package/dist/src/fixtures/runCustomFixtures.js +0 -77
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a string corresponding to a valid declaration and initialization of an Objective-C object literal.
|
|
3
|
+
*
|
|
4
|
+
* @param nsClass Class of the litteral
|
|
5
|
+
* @param name Desired name of the instance
|
|
6
|
+
* @param parameters Key-value object of parameters to translate to an Objective-C object litearal
|
|
7
|
+
* @param indent If true, will declare the litteral by indenting each new key/value pair.
|
|
8
|
+
* @return A valid Objective-C declaration and initialization of an Objective-C object litteral.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* nsDeclaration('NSDictionary', 'params', {a: 'b', c: 'd'}, true)
|
|
12
|
+
* // returns:
|
|
13
|
+
* NSDictionary *params = @{ @"a": @"b",
|
|
14
|
+
* @"c": @"d" };
|
|
15
|
+
*
|
|
16
|
+
* nsDeclaration('NSDictionary', 'params', {a: 'b', c: 'd'})
|
|
17
|
+
* // returns:
|
|
18
|
+
* NSDictionary *params = @{ @"a": @"b", @"c": @"d" };
|
|
19
|
+
*/
|
|
20
|
+
export declare const nsDeclaration: (nsClass: string, name: string, parameters: Record<string, any>, indent?: boolean) => string;
|
|
21
|
+
/**
|
|
22
|
+
* Create a valid Objective-C string of a literal value according to its type.
|
|
23
|
+
*
|
|
24
|
+
* @param value Any JavaScript literal
|
|
25
|
+
*/
|
|
26
|
+
export declare const literalRepresentation: (value: any, indentation?: number) => string;
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Objective-C using NSURLSession.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @thibaultCha
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface NsurlsessionOptions {
|
|
12
|
+
pretty?: boolean;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const nsurlsession: Client<NsurlsessionOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for OCaml using CoHTTP.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @SGrondin
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export declare const cohttp: Client;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for PHP using curl-ext.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @AhmadNassri
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface CurlOptions {
|
|
12
|
+
closingTag?: boolean;
|
|
13
|
+
maxRedirects?: number;
|
|
14
|
+
nameErrors?: boolean;
|
|
15
|
+
noTags?: boolean;
|
|
16
|
+
shortTags?: boolean;
|
|
17
|
+
timeout?: number;
|
|
18
|
+
}
|
|
19
|
+
export declare const curl: Client<CurlOptions>;
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for PHP using Guzzle.
|
|
4
|
+
*
|
|
5
|
+
* @author @RobertoArruda
|
|
6
|
+
* @author @erunion
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface GuzzleOptions {
|
|
12
|
+
closingTag?: boolean;
|
|
13
|
+
indent?: string;
|
|
14
|
+
noTags?: boolean;
|
|
15
|
+
shortTags?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const guzzle: Client<GuzzleOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for PHP using curl-ext.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @AhmadNassri
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface Http1Options {
|
|
12
|
+
closingTag?: boolean;
|
|
13
|
+
noTags?: boolean;
|
|
14
|
+
shortTags?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const http1: Client<Http1Options>;
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for PHP using curl-ext.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @AhmadNassri
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface Http2Options {
|
|
12
|
+
closingTag?: boolean;
|
|
13
|
+
noTags?: boolean;
|
|
14
|
+
shortTags?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const http2: Client<Http2Options>;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a valid Python string of a literal value according to its type.
|
|
3
|
+
*
|
|
4
|
+
* @param {*} value Any JavaScript literal
|
|
5
|
+
* @param {Object} opts Target options
|
|
6
|
+
* @return {string}
|
|
7
|
+
*/
|
|
8
|
+
export declare const literalRepresentation: (value: any, opts: Record<string, any>, indentLevel?: number) => any;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Python using Requests
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @montanaflynn
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface RequestsOptions {
|
|
12
|
+
pretty?: true;
|
|
13
|
+
}
|
|
14
|
+
export declare const requests: Client<RequestsOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for R using httr
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @gabrielakoreeda
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export declare const httr: Client;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
*
|
|
4
|
+
* HTTP code snippet generator for the Shell using cURL.
|
|
5
|
+
*
|
|
6
|
+
* @author
|
|
7
|
+
* @AhmadNassri
|
|
8
|
+
*
|
|
9
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
10
|
+
*/
|
|
11
|
+
import type { Client } from '../../targets';
|
|
12
|
+
export interface CurlOptions {
|
|
13
|
+
short?: boolean;
|
|
14
|
+
binary?: boolean;
|
|
15
|
+
globOff?: boolean;
|
|
16
|
+
indent?: string | false;
|
|
17
|
+
escapeBrackets?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare const curl: Client<CurlOptions>;
|
|
File without changes
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for the Shell using HTTPie.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @AhmadNassri
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface HttpieOptions {
|
|
12
|
+
body?: boolean;
|
|
13
|
+
cert?: boolean;
|
|
14
|
+
headers?: boolean;
|
|
15
|
+
pretty?: boolean;
|
|
16
|
+
print?: boolean;
|
|
17
|
+
queryParams?: boolean;
|
|
18
|
+
short?: boolean;
|
|
19
|
+
style?: boolean;
|
|
20
|
+
timeout?: boolean;
|
|
21
|
+
verbose?: boolean;
|
|
22
|
+
verify?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const httpie: Client<HttpieOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for the Shell using Wget.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @AhmadNassri
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface WgetOptions {
|
|
12
|
+
indent?: string | false;
|
|
13
|
+
short?: boolean;
|
|
14
|
+
verbose?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const wget: Client<WgetOptions>;
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Create a string corresponding to a valid declaration and initialization of a Swift array or dictionary literal
|
|
3
|
+
*
|
|
4
|
+
* @param name Desired name of the instance
|
|
5
|
+
* @param parameters Key-value object of parameters to translate to a Swift object litearal
|
|
6
|
+
* @param opts Target options
|
|
7
|
+
* @return {string}
|
|
8
|
+
*/
|
|
9
|
+
export declare const literalDeclaration: <T, U>(name: string, parameters: T, opts: U) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Create a valid Swift string of a literal value according to its type.
|
|
12
|
+
*
|
|
13
|
+
* @param value Any JavaScript literal
|
|
14
|
+
* @param opts Target options
|
|
15
|
+
*/
|
|
16
|
+
export declare const literalRepresentation: <T, U>(value: T, opts: U, indentLevel?: number) => number | string;
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Swift using NSURLSession.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @thibaultCha
|
|
7
|
+
*
|
|
8
|
+
* for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.
|
|
9
|
+
*/
|
|
10
|
+
import type { Client } from '../../targets';
|
|
11
|
+
export interface NsurlsessionOptions {
|
|
12
|
+
pretty?: boolean;
|
|
13
|
+
timeout?: number | string;
|
|
14
|
+
}
|
|
15
|
+
export declare const nsurlsession: Client<NsurlsessionOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { Merge } from 'type-fest';
|
|
2
|
+
import type { CodeBuilderOptions } from '../helpers/code-builder';
|
|
3
|
+
import type { Request } from '..';
|
|
4
|
+
export declare type TargetId = keyof typeof targets;
|
|
5
|
+
export declare type ClientId = string;
|
|
6
|
+
export interface ClientInfo {
|
|
7
|
+
key: ClientId;
|
|
8
|
+
title: string;
|
|
9
|
+
link: string;
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
12
|
+
export declare type Converter<T extends Record<string, any>> = (request: Request, options?: Merge<CodeBuilderOptions, T>) => string;
|
|
13
|
+
export interface Client<T extends Record<string, any> = Record<string, any>> {
|
|
14
|
+
info: ClientInfo;
|
|
15
|
+
convert: Converter<T>;
|
|
16
|
+
}
|
|
17
|
+
export declare type Extension = `.${string}` | null;
|
|
18
|
+
export interface TargetInfo {
|
|
19
|
+
key: TargetId;
|
|
20
|
+
title: string;
|
|
21
|
+
extname: Extension;
|
|
22
|
+
default: string;
|
|
23
|
+
cli?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface Target {
|
|
26
|
+
info: TargetInfo;
|
|
27
|
+
clientsById: Record<ClientId, Client>;
|
|
28
|
+
}
|
|
29
|
+
export declare const targets: {
|
|
30
|
+
c: Target;
|
|
31
|
+
clojure: Target;
|
|
32
|
+
csharp: Target;
|
|
33
|
+
go: Target;
|
|
34
|
+
http: Target;
|
|
35
|
+
java: Target;
|
|
36
|
+
javascript: Target;
|
|
37
|
+
kotlin: Target;
|
|
38
|
+
node: Target;
|
|
39
|
+
objc: Target;
|
|
40
|
+
ocaml: Target;
|
|
41
|
+
php: Target;
|
|
42
|
+
powershell: Target;
|
|
43
|
+
python: Target;
|
|
44
|
+
r: Target;
|
|
45
|
+
ruby: Target;
|
|
46
|
+
shell: Target;
|
|
47
|
+
swift: Target;
|
|
48
|
+
};
|
|
49
|
+
export declare const isTarget: (target: Target) => target is Target;
|
|
50
|
+
export declare const addTarget: (target: Target) => void;
|
|
51
|
+
export declare const isClient: (client: Client) => client is Client<Record<string, any>>;
|
|
52
|
+
export declare const addTargetClient: (targetId: TargetId, client: Client) => void;
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "4.0.
|
|
2
|
+
"version": "4.0.3",
|
|
3
3
|
"name": "@readme/httpsnippet",
|
|
4
4
|
"description": "HTTP Request snippet generator for *most* languages",
|
|
5
5
|
"homepage": "https://github.com/readmeio/httpsnippet",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsc --build tsconfig.build.json",
|
|
51
|
-
"clean": "
|
|
51
|
+
"clean": "rm -rf dist/",
|
|
52
52
|
"lint": "eslint .",
|
|
53
53
|
"prebuild": "npm run clean",
|
|
54
54
|
"prepack": "npm run build",
|
package/dist/package.json
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": "4.0.2",
|
|
3
|
-
"name": "@readme/httpsnippet",
|
|
4
|
-
"description": "HTTP Request snippet generator for *most* languages",
|
|
5
|
-
"homepage": "https://github.com/readmeio/httpsnippet",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"keywords": [
|
|
10
|
-
"api",
|
|
11
|
-
"clojure",
|
|
12
|
-
"csharp",
|
|
13
|
-
"curl",
|
|
14
|
-
"go",
|
|
15
|
-
"har",
|
|
16
|
-
"http",
|
|
17
|
-
"httpie",
|
|
18
|
-
"httr",
|
|
19
|
-
"java",
|
|
20
|
-
"javascript",
|
|
21
|
-
"jquery",
|
|
22
|
-
"kotlin",
|
|
23
|
-
"objc",
|
|
24
|
-
"objective-c",
|
|
25
|
-
"ocaml",
|
|
26
|
-
"php",
|
|
27
|
-
"python",
|
|
28
|
-
"request",
|
|
29
|
-
"requests",
|
|
30
|
-
"ruby",
|
|
31
|
-
"shell",
|
|
32
|
-
"snippet",
|
|
33
|
-
"swift",
|
|
34
|
-
"swift",
|
|
35
|
-
"unirest",
|
|
36
|
-
"xhr",
|
|
37
|
-
"xmlhttprequest"
|
|
38
|
-
],
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">=14"
|
|
41
|
-
},
|
|
42
|
-
"files": [
|
|
43
|
-
"dist"
|
|
44
|
-
],
|
|
45
|
-
"repository": {
|
|
46
|
-
"type": "git",
|
|
47
|
-
"url": "https://github.com/readmeio/httpsnippet.git"
|
|
48
|
-
},
|
|
49
|
-
"scripts": {
|
|
50
|
-
"build": "tsc --build tsconfig.build.json",
|
|
51
|
-
"clean": "tsc --build tsconfig.build.json --clean",
|
|
52
|
-
"lint": "eslint .",
|
|
53
|
-
"prebuild": "npm run clean",
|
|
54
|
-
"prepack": "npm run build",
|
|
55
|
-
"pretest": "npm run lint",
|
|
56
|
-
"prettier": "prettier --list-different --write \"./**/**.js\"",
|
|
57
|
-
"test": "jest --coverage"
|
|
58
|
-
},
|
|
59
|
-
"devDependencies": {
|
|
60
|
-
"@readme/eslint-config": "^8.8.3",
|
|
61
|
-
"@types/eslint": "^8.4.1",
|
|
62
|
-
"@types/event-stream": "^4.0.0",
|
|
63
|
-
"@types/har-format": "^1.2.8",
|
|
64
|
-
"@types/jest": "^27.4.1",
|
|
65
|
-
"@types/node": "^16.11.26",
|
|
66
|
-
"@types/qs": "^6.9.7",
|
|
67
|
-
"@types/stringify-object": "^4.0.1",
|
|
68
|
-
"eslint": "^8.19.0",
|
|
69
|
-
"glob": "^8.0.1",
|
|
70
|
-
"jest": "^28.0.3",
|
|
71
|
-
"prettier": "^2.7.1",
|
|
72
|
-
"require-directory": "^2.1.1",
|
|
73
|
-
"ts-jest": "^28.0.5",
|
|
74
|
-
"type-fest": "^2.12.2",
|
|
75
|
-
"typescript": "^4.6.3"
|
|
76
|
-
},
|
|
77
|
-
"dependencies": {
|
|
78
|
-
"ajv": "^6.12.6",
|
|
79
|
-
"event-stream": "4.0.1",
|
|
80
|
-
"form-data": "^4.0.0",
|
|
81
|
-
"har-schema": "^2.0.0",
|
|
82
|
-
"qs": "^6.10.1",
|
|
83
|
-
"stringify-object": "^3.3.0"
|
|
84
|
-
},
|
|
85
|
-
"prettier": "@readme/eslint-config/prettier"
|
|
86
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.customTarget = void 0;
|
|
4
|
-
var client_1 = require("../targets/node/request/client");
|
|
5
|
-
exports.customTarget = {
|
|
6
|
-
info: {
|
|
7
|
-
key: 'js-variant',
|
|
8
|
-
title: 'JavaScript Variant',
|
|
9
|
-
extname: '.js',
|
|
10
|
-
"default": 'request'
|
|
11
|
-
},
|
|
12
|
-
clientsById: {
|
|
13
|
-
request: client_1.request
|
|
14
|
-
}
|
|
15
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.mimetypes = void 0;
|
|
4
|
-
exports.mimetypes = {
|
|
5
|
-
'multipart/mixed': {
|
|
6
|
-
method: 'POST',
|
|
7
|
-
url: 'https://httpbin.org/anything',
|
|
8
|
-
postData: {
|
|
9
|
-
mimeType: 'multipart/mixed',
|
|
10
|
-
text: ''
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
'multipart/related': {
|
|
14
|
-
method: 'POST',
|
|
15
|
-
url: 'https://httpbin.org/anything',
|
|
16
|
-
postData: {
|
|
17
|
-
mimeType: 'multipart/related',
|
|
18
|
-
text: ''
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
'multipart/form-data': {
|
|
22
|
-
method: 'POST',
|
|
23
|
-
url: 'https://httpbin.org/anything',
|
|
24
|
-
postData: {
|
|
25
|
-
mimeType: 'multipart/form-data',
|
|
26
|
-
text: ''
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
'multipart/alternative': {
|
|
30
|
-
method: 'POST',
|
|
31
|
-
url: 'https://httpbin.org/anything',
|
|
32
|
-
postData: {
|
|
33
|
-
mimeType: 'multipart/alternative',
|
|
34
|
-
text: ''
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
'application/x-www-form-urlencoded': {
|
|
38
|
-
method: 'POST',
|
|
39
|
-
url: 'https://httpbin.org/anything',
|
|
40
|
-
postData: {
|
|
41
|
-
mimeType: 'application/x-www-form-urlencoded',
|
|
42
|
-
text: ''
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
'text/json': {
|
|
46
|
-
method: 'POST',
|
|
47
|
-
url: 'https://httpbin.org/anything',
|
|
48
|
-
postData: {
|
|
49
|
-
mimeType: 'text/json',
|
|
50
|
-
text: ''
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
'text/x-json': {
|
|
54
|
-
method: 'POST',
|
|
55
|
-
url: 'https://httpbin.org/anything',
|
|
56
|
-
postData: {
|
|
57
|
-
mimeType: 'text/x-json',
|
|
58
|
-
text: ''
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
'application/x-json': {
|
|
62
|
-
method: 'POST',
|
|
63
|
-
url: 'https://httpbin.org/anything',
|
|
64
|
-
postData: {
|
|
65
|
-
mimeType: 'application/x-json',
|
|
66
|
-
text: ''
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
'invalid-json': {
|
|
70
|
-
method: 'POST',
|
|
71
|
-
url: 'https://httpbin.org/anything',
|
|
72
|
-
postData: {
|
|
73
|
-
mimeType: 'application/json',
|
|
74
|
-
text: 'foo/bar'
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|