488 Commits

Author SHA1 Message Date
Boris Verkhovskiy
5f7fb52258 support Locale-Specific Translation strings (#402) 2022-04-27 22:39:04 -07:00
Boris Verkhovskiy
763645d050 show bash code in more errors (#400) 2022-04-24 07:05:48 -07:00
Boris Verkhovskiy
39f01a5a47 report Bash parsing errors (#399)
* allow passing warnings list to *Warn() functions

that way if there's an error, we can catch the error, look at the
warnings that happened while parsing and show them to users.
2022-04-24 04:57:03 -07:00
Boris Verkhovskiy
a29f9bc259 warn users if their request looks like http/2 (#398) 2022-04-23 12:18:18 -07:00
Boris Verkhovskiy
afba7f2413 Always add scheme to URL (#397) 2022-04-23 12:09:07 -07:00
Boris Verkhovskiy
5747e27754 read cookies from file in Python (#396)
* ignore --cookie when its a file

* read cookies from file in generated Python code
2022-04-23 01:47:35 -07:00
Boris Verkhovskiy
247a741ed6 support --form, --proxy and --upload-file for fetch() (#395) 2022-04-22 13:55:42 -07:00
Boris Verkhovskiy
dda866a741 axios.post .put and .patch expect data as the second argument (#393)
* axios.post .put .patch take data as the 2nd arg

* rename formData to form

* add warning about data not being sent

* sort imports properly

* passing an object as data sends it as json, not urlencoded
2022-04-21 15:19:36 -07:00
Boris Verkhovskiy
2d9ff6f0aa import FormData polyfill on Node.js (#392)
* import FormData polyfill on Node.js

* remove type assertion
2022-04-21 10:24:28 -07:00
Boris Verkhovskiy
7f727afd01 generate JS+axios code (#388)
* generate JS+axios code

* add some aliases to cli.ts

* add getContentType to utils.ts which does a bit of parsing of the header
2022-04-20 15:59:50 -07:00
Boris Verkhovskiy
72995ff6c7 support warnings in generators (#387) 2022-04-19 13:40:25 -07:00
Boris Verkhovskiy
467f093a72 warn users when they use unsupported options (#386)
* warn users about unsupported options

* do the rest

* don't report that Warn() isn't tested
2022-04-16 21:56:33 -07:00
Boris Verkhovskiy
d83919e85c support --upload-file in Python generator (#382)
* support --upload-file in Python generator

* import sys

* add --upload-file to url

* update test

* handle automatically added / by URL.parse

* update test

* remove done todo
2022-04-15 13:05:35 -07:00
Boris Verkhovskiy
5c2f1ab054 handle --form more correctly (#385) 2022-04-14 18:26:13 -07:00
Boris Verkhovskiy
733f110e56 lint once (#384)
* lint only once

* don't try to run deploy action on forks
2022-04-13 23:15:36 -07:00
Boris Verkhovskiy
636fe09cdd use new paths in metadata files (#383) 2022-04-12 23:23:15 -07:00
Boris Verkhovskiy
4d8691776d auto-deploy demo site on commit to master (#380) 2022-04-12 21:24:33 -07:00
Boris Verkhovskiy
1640ca881a escape strings in Go generator (#381) 2022-04-12 18:53:48 -07:00
Boris Verkhovskiy
ac70a67e55 add encode=form to R code when passed --data (#379)
* add encode=form to R code when passed --data

* update tests

* remove unused import

* allow comparing requests from generated r code
2022-04-12 14:25:06 -07:00
Boris Verkhovskiy
6ad5664f0a make all tests request localhost:28139 (#377)
* make all test requests ping localhost:28139

so that they work with compare-requests

* run gen-test

* lint cfml
2022-04-09 17:37:29 -07:00
Scott Steinbeck
4e46ceaf26 Cfml support (#376)
* Add CFML Support

* convert to TS and update Readme Page

* Delete package-lock.json

unchanged, does not need to be a part of the PR

* Changed file extension of test fixtures to match utility

* update tests to show .cfm extension

* updated generator with quote function, updated a few tests

* Update README.md

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* updated generator with cookie, and binary file, and charset changes. Updated tests to allot for generator changes

* fix formatting

* add back lock file

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* revert lock file

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* update timeout syntax

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* update default proxy port

* update default proxy port2 with tests

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

* update setting auth credentials

* add prettier formatting

* Update src/generators/cfml.ts

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>

Co-authored-by: Boris Verkhovskiy <boris.verk@gmail.com>
2022-04-09 17:31:11 -07:00
Boris Verkhovskiy
31ca0dfb08 add more type definitions (#374)
* rename github actions file

* type request

* type generators
2022-04-04 05:54:30 -07:00
Boris Verkhovskiy
1864b07750 completely convert to typescript (#373) 2022-03-31 20:37:50 -07:00
Boris Verkhovskiy
7c75a10c26 Reformat code (#372)
* format with prettier

* format pre-commit

* format in ci

* remove standardjs editor config
2022-03-31 20:34:00 -07:00
Boris Verkhovskiy
f29c397882 convert to typescript (#368)
* compile with typescript

* add types

* rename tree-sitter import file

* proofread README.md
2022-03-30 22:56:25 -07:00
Boris Verkhovskiy
9c01335485 build wasm on local npm install (#371)
* make package installable from git

* disable macos tests

because it doesn't find emcc for some reason
2022-03-30 06:35:13 -07:00
Boris Verkhovskiy
5872b7bde1 make gen-test update all tests when passed no args (#370) 2022-03-30 03:01:01 -07:00
Boris Verkhovskiy
62ffa2c3a8 replace \a with BEL (#367) 2022-03-28 20:04:11 -07:00
Boris Verkhovskiy
ca6ac17dd4 Handle bash redirects in input command (#364)
* handle bash redirect statements in input command

* read from stdin

* basic handling of herestrings
2022-03-27 22:11:38 -07:00
Boris Verkhovskiy
ac09f46e0c perserve method case (#365) 2022-03-27 04:44:35 -07:00
Boris Verkhovskiy
6513ea5dc9 comment out Accept-Encoding header (#363)
* comment out Accept-Encoding header

because it can cause issues when it includes a compression algorithm
that requests doesn't support

* update tests
2022-03-26 04:40:19 -07:00
Boris Verkhovskiy
6a43531ec4 parse headers more like curl and query more like python (#362)
* parse headers more like curl and query like python

* --data sets content-type

* update sample in readme

* actually handle empty -H
2022-03-26 01:44:46 -07:00
Boris Verkhovskiy
a532bd4158 Warn users that Requests doesn't support HTTP/2 (#361) 2022-03-21 15:41:57 -07:00
Boris Verkhovskiy
82fdaa0dba support --json (#358) 2022-03-21 11:54:41 -07:00
Ekin Karadeniz
aaaf13189b Support proxy, proxy-user, max-time, location on PHP (#354) 2022-03-21 10:12:03 -07:00
Boris Verkhovskiy
7595e8b94f handle charset=UTF-8 in Content-Type header (#356) 2022-03-21 08:47:37 -07:00
Boris Verkhovskiy
4129d6b885 depend on our fork of tree-sitter-bash (#346) v4.0.0-alpha.10 2022-03-19 02:51:47 -07:00
Boris Verkhovskiy
7d3e021b68 --proxy (#353)
for Python
2022-03-19 01:31:39 -07:00
Boris Verkhovskiy
255a4e9389 dart: wrap URL in Uri.parse() (#352) 2022-03-18 23:52:44 -07:00
Boris Verkhovskiy
8d5700c72b --referer (#351)
* --referer

* tests

* read curl docs
2022-03-18 22:24:51 -07:00
Boris Verkhovskiy
fe13b2e35f fix --cookie (#350) 2022-03-18 21:22:33 -07:00
Boris Verkhovskiy
975db90c7c add support for --output to Python (#349) 2022-03-18 19:17:55 -07:00
Boris Verkhovskiy
46c54b318f parse -F to a list of lists (#348)
* parse -F to a list of lists

* detect repeated form keys
2022-03-18 19:01:27 -07:00
Boris Verkhovskiy
b12081bc7e parse Cookie header and --cookie losslessly (#347) 2022-03-18 16:23:44 -07:00
Boris Verkhovskiy
081c4a8934 Parse headers to a list of lists (#321)
* Delete Content-Type when it's multipart/form

and we generate a files= line

* add TODO

* Comment out header instead

* add explanations when commenting out headers

also comment out TE header if it's set to trailers

* convert headers to a list of lists

* find "Cookie" header case-insensitively

* lint

* update comment wording
2022-03-17 17:24:15 -07:00
Boris Verkhovskiy
a731d9a8b7 support --digest auth in Python output (#345) 2022-03-16 23:20:35 -07:00
Boris Verkhovskiy
ca185a55c9 handle backslashes in words (#344) 2022-03-16 21:43:49 -07:00
Boris Verkhovskiy
618bc69e91 parse querystring losslessly (#340)
* parse querystring losslessly

* remove warning

which is hopefully no longer true

* .split doesn't work how I thought it did

* actually detect when a param is missing a =

* use new parsings in python.js

* don't decode query string if it doesn't round-trip

when you percent-decode and re-encode it

* fix tests

* update generators to work with list of lists

* used queryDict in json.js

* fix python and qs parser

* check percent encoding space as + too
2022-03-16 20:49:54 -07:00
Boris Verkhovskiy
01f2538e59 bump version (#343)
and readme update
2022-03-16 15:08:19 -07:00
iamdual
3f7e9f051f Usage of PHP's native cURL library instead of a composer package (#332)
* Usage of PHP's native cURL library instead of a composer package

* Add support for multipart/form-data

* Add support for binary data

* Replace tabs to 4-spaces and bring back php-requests.js

* Add tests for php-requests

* Reset test.js due to conflict

* Fix linter error
2022-03-15 14:14:31 -07:00