40 Commits

Author SHA1 Message Date
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
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
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
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
Nick Carneiro
2ef84783f4 applied standard styles, moved test.js to root dir 2016-09-12 20:09:05 -07:00
Wyatt Alt
31188c6775 Add python support for curl -k/--insecure 2016-09-10 21:08:10 -07:00
Nick Carneiro
d7167d3ed3 Merge pull request #17 from nashe/fix-php-urlencode
Fix single quotes issue with PHP
2016-03-23 13:39:54 -07:00
nashe
03c0248597 Fix single quotes issue with PHP 2016-03-23 20:56:31 +01:00
nashe
3ca7ea0255 Ignore .DS_Store files 2016-03-23 20:21:08 +01:00
Nick Carneiro
f7f7d89177 added support for PUT and local file upload in python, closes #14 2016-03-19 23:00:59 -05:00
Nick Carneiro
43ece41e79 add support for multiline commands and -d param data /fixes #13 2016-02-29 22:48:23 -08:00
Nick Carneiro
6545539f5b support url argument in other common curl configurations, closes #4, #7 2016-02-13 22:40:57 -08:00
Nick Carneiro
9c74cb1980 add support for quotation marks in data for node.js, fixes #12 2016-02-13 22:00:57 -08:00
Nick Carneiro
e7fabf0b95 fix header handling for requests with a single header 2016-02-12 16:25:15 -08:00
Nick Carneiro
f4b2c7699b handle php cookies 2016-01-31 13:28:16 -08:00
Nick Carneiro
392bbfd052 added php support for post requests 2016-01-31 13:03:26 -08:00
Nick Carneiro
d4da3faa0b add support for data-binary curl commands, closes #6 2015-12-23 18:37:37 -06:00
perry haldenby
9c61c2154a fix node request generation - use body instead of data keyword for post body 2015-11-28 14:10:39 -05:00
Nick Carneiro
fc574b9f43 don't assume space after colon in header values, fixes #2 2015-08-17 23:54:06 -07:00
Nick Carneiro
996fe8c1e6 added support for simplest curl GET command with no headers 2015-01-22 21:48:42 -08:00
Nick Carneiro
c5e03c8dba added unit tests for parser 2015-01-02 14:14:44 -06:00
Nick Carneiro
0a658e62cf added node.js support 2015-01-01 23:12:03 -06:00
Nick Carneiro
b9a0832444 make request method a post when there is --data 2014-12-31 11:26:57 -06:00
Nick Carneiro
fbb6b07447 add support for --data 2014-12-31 10:18:27 -06:00
Nick Carneiro
24ae9efe41 update grunt config to run tape tests 2014-12-30 13:49:34 -06:00
Nick Carneiro
2fd93e703c use node-getopt for parsing curl options and cookie for parsing cookies 2014-12-27 17:29:32 -06:00
Nick Carneiro
8fb6c4f58b initial commit 2014-12-24 23:38:55 -06:00