@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,49 @@
|
|
|
1
|
+
export declare type PostProcessor = (unreplacedCode: string) => string;
|
|
2
|
+
export interface CodeBuilderOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Desired indentation character for aggregated lines of code
|
|
5
|
+
* @default ''
|
|
6
|
+
*/
|
|
7
|
+
indent?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Desired character to join each line of code
|
|
10
|
+
* @default \n
|
|
11
|
+
*/
|
|
12
|
+
join?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare class CodeBuilder {
|
|
15
|
+
postProcessors: PostProcessor[];
|
|
16
|
+
code: string[];
|
|
17
|
+
indentationCharacter: string;
|
|
18
|
+
lineJoin: string;
|
|
19
|
+
/**
|
|
20
|
+
* Helper object to format and aggragate lines of code.
|
|
21
|
+
* Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
|
|
22
|
+
*/
|
|
23
|
+
constructor({ indent, join }?: CodeBuilderOptions);
|
|
24
|
+
/**
|
|
25
|
+
* Add given indentation level to given line of code
|
|
26
|
+
*/
|
|
27
|
+
indentLine: (line: string, indentationLevel?: number) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Add the line at the beginning of the current lines
|
|
30
|
+
*/
|
|
31
|
+
unshift: (line: string, indentationLevel?: number) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Add the line at the end of the current lines
|
|
34
|
+
*/
|
|
35
|
+
push: (line: string, indentationLevel?: number) => void;
|
|
36
|
+
/**
|
|
37
|
+
* Add an empty line at the end of current lines
|
|
38
|
+
*/
|
|
39
|
+
blank: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Concatenate all current lines using the given lineJoin, then apply any replacers that may have been added
|
|
42
|
+
*/
|
|
43
|
+
join: () => string;
|
|
44
|
+
/**
|
|
45
|
+
* Often when writing modules you may wish to add a literal tag or bit of metadata that you wish to transform after other processing as a final step.
|
|
46
|
+
* To do so, you can provide a PostProcessor function and it will be run automatically for you when you call `join()` later on.
|
|
47
|
+
*/
|
|
48
|
+
addPostProcessor: (postProcessor: PostProcessor) => void;
|
|
49
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license https://raw.githubusercontent.com/node-fetch/node-fetch/master/LICENSE.md
|
|
3
|
+
*
|
|
4
|
+
* The MIT License (MIT)
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2016 - 2020 Node Fetch Team
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* Extracted from https://github.com/node-fetch/node-fetch/blob/64c5c296a0250b852010746c76144cb9e14698d9/src/utils/form-data.js
|
|
27
|
+
*/
|
|
28
|
+
import type FormData from 'form-data';
|
|
29
|
+
export declare const isBlob: (object: any) => boolean;
|
|
30
|
+
export declare const formDataIterator: (form: FormData, boundary: string) => Generator<any, void, any>;
|
|
File without changes
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ErrorObject } from 'ajv';
|
|
2
|
+
import type { Request } from 'har-format';
|
|
3
|
+
export declare class HARError extends Error {
|
|
4
|
+
name: string;
|
|
5
|
+
message: string;
|
|
6
|
+
errors: ErrorObject[];
|
|
7
|
+
constructor(errors: ErrorObject[]);
|
|
8
|
+
}
|
|
9
|
+
export declare const validateHarRequest: (request: any) => request is Request;
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare type Headers<T> = Record<string, T>;
|
|
2
|
+
/**
|
|
3
|
+
* Given a headers object retrieve a specific header out of it via a case-insensitive key.
|
|
4
|
+
*/
|
|
5
|
+
export declare const getHeaderName: <T>(headers: Headers<T>, name: string) => string | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Given a headers object retrieve the contents of a header out of it via a case-insensitive key.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getHeader: <T>(headers: Headers<T>, name: string) => T | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Determine if a given case-insensitive header exists within a header object.
|
|
12
|
+
*/
|
|
13
|
+
export declare const hasHeader: <T>(headers: Headers<T>, name: string) => boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Determines if a given MIME type is JSON, or a variant of such.
|
|
16
|
+
*/
|
|
17
|
+
export declare const isMimeTypeJSON: (mimeType: string) => boolean;
|
|
18
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Use 'strong quoting' using single quotes so that we only need to deal with nested single quote characters.
|
|
3
|
+
* see: http://wiki.bash-hackers.org/syntax/quoting#strong_quoting
|
|
4
|
+
*/
|
|
5
|
+
export declare const quote: (value?: string) => string;
|
|
6
|
+
export declare const escape: (value: string) => string;
|
|
File without changes
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ClientInfo, TargetId, TargetInfo } from '../targets/targets';
|
|
2
|
+
export interface AvailableTarget extends TargetInfo {
|
|
3
|
+
clients: ClientInfo[];
|
|
4
|
+
}
|
|
5
|
+
export declare const availableTargets: () => AvailableTarget[];
|
|
6
|
+
export declare const extname: (targetId: TargetId) => "" | `.${string}`;
|
|
File without changes
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import type { Param, PostDataCommon, Request as NpmHarRequest } from 'har-format';
|
|
3
|
+
import type { UrlWithParsedQuery } from 'url';
|
|
4
|
+
import type { ReducedHelperObject } from './helpers/reducer';
|
|
5
|
+
import type { ClientId, TargetId } from './targets/targets';
|
|
6
|
+
export { availableTargets, extname } from './helpers/utils';
|
|
7
|
+
export { addTarget, addTargetClient } from './targets/targets';
|
|
8
|
+
/** is this wrong? yes. according to the spec (http://www.softwareishard.com/blog/har-12-spec/#postData) it's technically wrong since `params` and `text` are (by the spec) mutually exclusive. However, in practice, this is not what is often the case.
|
|
9
|
+
*
|
|
10
|
+
* In general, this library takes a _descriptive_ rather than _perscriptive_ approach (see https://amyrey.web.unc.edu/classes/ling-101-online/tutorials/understanding-prescriptive-vs-descriptive-grammar/).
|
|
11
|
+
*
|
|
12
|
+
* Then, in addition to that, it really adds to complexity with TypeScript (TypeScript takes this constraint very very seriously) in a way that's not actually super useful. So, we treat this object as though it could have both or either of `params` and/or `text`.
|
|
13
|
+
*/
|
|
14
|
+
declare type PostDataBase = PostDataCommon & {
|
|
15
|
+
text?: string;
|
|
16
|
+
params?: Param[];
|
|
17
|
+
};
|
|
18
|
+
export declare type HarRequest = Omit<NpmHarRequest, 'postData'> & {
|
|
19
|
+
postData: PostDataBase;
|
|
20
|
+
};
|
|
21
|
+
export interface RequestExtras {
|
|
22
|
+
postData: PostDataBase & {
|
|
23
|
+
jsonObj?: ReducedHelperObject;
|
|
24
|
+
paramsObj?: ReducedHelperObject;
|
|
25
|
+
boundary?: string;
|
|
26
|
+
};
|
|
27
|
+
fullUrl: string;
|
|
28
|
+
queryObj: ReducedHelperObject;
|
|
29
|
+
headersObj: ReducedHelperObject;
|
|
30
|
+
uriObj: UrlWithParsedQuery;
|
|
31
|
+
cookiesObj: ReducedHelperObject;
|
|
32
|
+
allHeaders: ReducedHelperObject;
|
|
33
|
+
}
|
|
34
|
+
export declare type Request = HarRequest & RequestExtras;
|
|
35
|
+
interface Entry {
|
|
36
|
+
request: Partial<HarRequest>;
|
|
37
|
+
}
|
|
38
|
+
interface HarEntry {
|
|
39
|
+
log: {
|
|
40
|
+
version: string;
|
|
41
|
+
creator: {
|
|
42
|
+
name: string;
|
|
43
|
+
version: string;
|
|
44
|
+
};
|
|
45
|
+
entries: Entry[];
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export interface HTTPSnippetOptions {
|
|
49
|
+
harIsAlreadyEncoded?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export declare class HTTPSnippet {
|
|
52
|
+
requests: Request[];
|
|
53
|
+
constructor(input: HarEntry | HarRequest, opts?: HTTPSnippetOptions);
|
|
54
|
+
prepare: (harRequest: HarRequest, options: HTTPSnippetOptions) => {
|
|
55
|
+
allHeaders: {
|
|
56
|
+
[x: string]: string | string[];
|
|
57
|
+
};
|
|
58
|
+
fullUrl: string;
|
|
59
|
+
url: string;
|
|
60
|
+
uriObj: {
|
|
61
|
+
query: ReducedHelperObject;
|
|
62
|
+
search: string;
|
|
63
|
+
path: string | null;
|
|
64
|
+
auth: string | null;
|
|
65
|
+
hash: string | null;
|
|
66
|
+
host: string | null;
|
|
67
|
+
hostname: string | null;
|
|
68
|
+
href: string;
|
|
69
|
+
pathname: string | null;
|
|
70
|
+
protocol: string | null;
|
|
71
|
+
slashes: boolean | null;
|
|
72
|
+
port: string | null;
|
|
73
|
+
};
|
|
74
|
+
comment?: string | undefined;
|
|
75
|
+
method: string;
|
|
76
|
+
httpVersion: string;
|
|
77
|
+
cookies: import("har-format").Cookie[];
|
|
78
|
+
headers: import("har-format").Header[];
|
|
79
|
+
queryString: import("har-format").QueryString[];
|
|
80
|
+
headersSize: number;
|
|
81
|
+
bodySize: number;
|
|
82
|
+
postData: PostDataCommon & {
|
|
83
|
+
text?: string | undefined;
|
|
84
|
+
params?: Param[] | undefined;
|
|
85
|
+
} & {
|
|
86
|
+
jsonObj?: ReducedHelperObject | undefined;
|
|
87
|
+
paramsObj?: ReducedHelperObject | undefined;
|
|
88
|
+
boundary?: string | undefined;
|
|
89
|
+
};
|
|
90
|
+
queryObj: ReducedHelperObject;
|
|
91
|
+
headersObj: ReducedHelperObject;
|
|
92
|
+
cookiesObj: ReducedHelperObject;
|
|
93
|
+
};
|
|
94
|
+
convert: (targetId: TargetId, clientId?: ClientId, options?: any) => string | false | string[];
|
|
95
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Clojure using clj-http.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @tggreene
|
|
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 clj_http: Client;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for native Go.
|
|
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 GoNativeOptions {
|
|
12
|
+
showBoilerplate?: boolean;
|
|
13
|
+
checkErrors?: boolean;
|
|
14
|
+
printBody?: boolean;
|
|
15
|
+
timeout?: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const native: Client<GoNativeOptions>;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator to generate raw HTTP/1.1 request strings,
|
|
4
|
+
* in accordance to the RFC 7230 (and RFC 7231) specifications.
|
|
5
|
+
*
|
|
6
|
+
* @author
|
|
7
|
+
* @irvinlim
|
|
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
|
+
interface Http11Options {
|
|
13
|
+
absoluteURI?: boolean;
|
|
14
|
+
autoContentLength?: boolean;
|
|
15
|
+
autoHost?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Request follows the request message format in accordance to RFC 7230, Section 3.
|
|
19
|
+
* Each section is prepended with the RFC and section number.
|
|
20
|
+
* See more at https://tools.ietf.org/html/rfc7230#section-3.
|
|
21
|
+
*/
|
|
22
|
+
export declare const http11: Client<Http11Options>;
|
|
23
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* Asynchronous Http and WebSocket Client library for Java
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @windard
|
|
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 asynchttp: Client;
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Java using java.net.http.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @wtetsu
|
|
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 NetHttpOptions {
|
|
12
|
+
indent?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const nethttp: Client;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Java using OkHttp.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @shashiranjan84
|
|
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 okhttp: Client;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Java using Unirest.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @shashiranjan84
|
|
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 unirest: Client;
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for Javascript & Node.js using Axios.
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @rohit-gohri
|
|
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 axios: Client;
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/{src/targets → targets}/javascript/axios/fixtures/multipart-form-data-no-params.js
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @description
|
|
3
|
+
* HTTP code snippet generator for fetch
|
|
4
|
+
*
|
|
5
|
+
* @author
|
|
6
|
+
* @pmdroid
|
|
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
|
+
interface FetchOptions {
|
|
12
|
+
credentials?: Record<string, string> | null;
|
|
13
|
+
}
|
|
14
|
+
export declare const fetch: Client<FetchOptions>;
|
|
15
|
+
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|