/
trillworks.html
143 lines (135 loc) · 5.74 KB
/
trillworks.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Utility for converting curl commands to code">
<meta name="author" content="Nick Carneiro">
<title>Convert cURL command syntax to Python requests, Ansible URI, browser fetch, MATLAB, Node.js, R, PHP, Strest, Go, Dart, JSON, Elixir, and Rust code</title>
<link href="styles/app.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-12">
<ul class="nav nav-pills pull-right">
<li><a href="https://github.com/NickCarneiro/curlconverter">GitHub</a></li>
<li style="padding-top: 8px; padding-left: 10px;"><iframe src="https://ghbtns.com/github-btn.html?user=NickCarneiro&repo=curlconverter&type=watch&count=true&size=large" frameborder="0" scrolling="0" width="170px" height="30px"></iframe></li>
</ul>
<h3 class="text-muted hidden-xs">Convert curl syntax to Python, Ansible URI, MATLAB, Node.js, R, PHP, Strest, Go, Dart, JSON, Elixir, Rust</h3>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<h2>curl command</h2>
<textarea id="curl-code" class="code" placeholder="Paste a curl command here"></textarea>
<div>
Examples:
<a id="get-example" href="#">GET</a>
-
<a id="post-example" href="#">POST</a>
-
<a id="basic-auth-example" href="#">Basic Auth</a>
</div>
</div>
<div class="col-sm-6">
<h2 id="generated-code-title">Python requests</h2>
<div style="display: none;" id="issue-promo">If your syntax is correct, create an
<a href="https://github.com/NickCarneiro/curlconverter/issues/new" target="_blank">issue</a>.
</div>
<textarea id="generated-code" class="code"></textarea>
</div>
</div>
<div class="row">
<div class="col-lg-12 button-container">
<label for="language">
Language
</label>
<select class="form-control" id="language">
<option value="ansible">Ansible</option>
<option value="browser">Browser (fetch)</option>
<option value="dart">Dart</option>
<option value="elixir">Elixir</option>
<option value="go">Go</option>
<option value="json">JSON</option>
<option value="node-fetch">Node.js (fetch)</option>
<option value="node-request">Node.js (request)</option>
<option value="matlab">MATLAB</option>
<option value="php">PHP</option>
<option value="python" selected="selected">Python</option>
<option value="r">R</option>
<option value="rust">Rust</option>
<option value="strest">Strest</option>
</select>
</div>
</div>
<div class="row extra-padding">
<div class="col-lg-2">
<h3>Curl from Chrome</h3>
<ul class="chrome">
<li>1) Open the network tab in DevTools</li>
<li>2) Ctrl-click a request, "Copy as cURL".</li>
<li>3) Paste it in the curl command box.</li>
</ul>
</div>
<div class="col-lg-6">
<img class="screenshot" src="images/newscreenshot.png" srcset="images/newscreenshot@2x.png 2x" alt="screenshot of chrome devtools">
</div>
<div class="col-lg-4">
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CE7DEK7I&placement=curltrillworkscom" id="_carbonads_js"></script>
</div>
</div>
<div class="row extra-padding">
<div class="col-sm-12">
👋 Post your job here. $100 for one month. Reach 20,000 developers. Email nickc@trillworks.com.
</div>
</div>
<div class="row border-top extra-padding">
<div class="col-sm-4">
<h3>Support Us</h3>
<div class="well larger-text">
<p>GitHub is matching all contributions to this project on <a href="https://github.com/sponsors/NickCarneiro">Github Sponsors</a>.
This is a surprisingly good deal and I'm not sure how long it's going to last.
</p>
<a class="btn btn-primary" href="https://github.com/sponsors/NickCarneiro">
Contribute Now
</a>
</div>
</div>
<div class="col-sm-4">
<h3>Related Tools</h3>
<ul>
<li><a href="https://mholt.github.io/curl-to-go/">curl-to-Go</a></li>
<li><a href="https://incarnate.github.io/curl-to-php/">curl-to-PHP</a></li>
<li><a href="https://mattcg.github.io/har-to-curl/">HAR-to-curl</a></li>
</ul>
</div>
<div class="col-sm-4">
<h3>Find a problem?</h3>
<div class="well larger-text">
Please report bugs on
<a href="https://github.com/NickCarneiro/curlconverter">GitHub</a>.
<p>
🎃 Curltoberfest is happening! I'll pay $10 for every bug fixed. Email nickc@trillworks.com in advance to confirm.
</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12 footer">
You should follow me on twitter <a href="https://twitter.com/nickc_dev">here</a>.
</div>
</div>
</div>
<script src="scripts/main.min.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-7363929-21', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>