All Projects → PaulKinlan → domcurl

PaulKinlan / domcurl

Licence: Apache-2.0 license
cUrl-like utility for fetching a resource (in this case we will run JS and return after network is idle) - great for JS heavy apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to domcurl

squirrel
Like curl, or wget, but downloads directly go to a SQLite databse
Stars: ✭ 24 (-71.43%)
Mutual labels:  curl
fortran-curl
Fortran 2008 interface bindings to libcurl
Stars: ✭ 25 (-70.24%)
Mutual labels:  curl
pg curl
PostgreSQL curl allows most curl actions, including data transfer with URL syntax via HTTP, HTTPS, FTP, FTPS, GOPHER, TFTP, SCP, SFTP, SMB, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3, RTSP and RTMP
Stars: ✭ 30 (-64.29%)
Mutual labels:  curl
GitHubAPI
[UNMAINTAINED] This is a simple Object Oriented wrapper for GitHub API v3, written with PHP7.
Stars: ✭ 36 (-57.14%)
Mutual labels:  curl
boast
I want track all HTTP requests, and replay it easily.
Stars: ✭ 61 (-27.38%)
Mutual labels:  curl
easyhttp
EasyHttp 是一个轻量级、语义化、对IDE友好的HTTP客户端,支持常见的HTTP请求、异步请求和并发请求,让你可以快速地使用 HTTP 请求与其他 Web 应用进行通信。
Stars: ✭ 31 (-63.1%)
Mutual labels:  curl
orca
C Multi-REST API library for Discord, Slack, Reddit, etc.
Stars: ✭ 360 (+328.57%)
Mutual labels:  curl
gohit
Run curl commands from yaml files
Stars: ✭ 19 (-77.38%)
Mutual labels:  curl
textics
📉 JavaScript Text Statistics that counts lines, words, chars, and spaces.
Stars: ✭ 36 (-57.14%)
Mutual labels:  curl
curl2ab
Convert cURL command line to ab (apache bench)
Stars: ✭ 22 (-73.81%)
Mutual labels:  curl
libopenTIDAL
TIDAL API interface written in ANSI C
Stars: ✭ 17 (-79.76%)
Mutual labels:  curl
php-curl-cookbook
PHP CURL Cookbook 📖
Stars: ✭ 83 (-1.19%)
Mutual labels:  curl
guile-curl
A language binding for the CURL network client library for the Guile version of the Scheme language
Stars: ✭ 23 (-72.62%)
Mutual labels:  curl
CurlDSL
CurlDSL converts cURL commands into URLRequest objects
Stars: ✭ 56 (-33.33%)
Mutual labels:  curl
r2curl
Node.js Request Wrapper (axios, fetch, ..) to cURL Command String
Stars: ✭ 30 (-64.29%)
Mutual labels:  curl
opencv3-setup
Raspberry Pi whiptail Menu driven Easy Install and Compile of opencv3 python from source files.
Stars: ✭ 47 (-44.05%)
Mutual labels:  curl
1c http
Подсистема 1С для работы с HTTP
Stars: ✭ 48 (-42.86%)
Mutual labels:  curl
homebrew-portable-ruby
🚗 Versions of Ruby that can be installed and run from anywhere on the filesystem.
Stars: ✭ 96 (+14.29%)
Mutual labels:  curl
curl
cURL command in full java. Any argument/option you need raise an issue here.
Stars: ✭ 103 (+22.62%)
Mutual labels:  curl
Speedport-Plus-Cosmote-Router-hacks
Exploring the Sercomm made router of Cosmote - OTE Group (Deutsche Telekom in Greece)
Stars: ✭ 64 (-23.81%)
Mutual labels:  curl

domcurl

cUrl-like utility for fetching a resource (in this case we will run JS and return after network is idle) - great for JS heavy apps.

Installation

npm i domcurl

Usage

Basic usage

domcurl [url]

or

domcurl --url https://example.com

<!DOCTYPE html><html><head>
    <title>Example Domain</title>

    <meta charset="utf-8">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
        
    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 50px;
        background-color: #fff;
        border-radius: 1em;
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        body {
            background-color: #fff;
        }
        div {
            width: auto;
            margin: 0 auto;
            border-radius: 0;
            padding: 1em;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is established to be used for illustrative examples in documents. You may use this
    domain in examples without prior coordination or asking for permission.</p>
    <p><a href="http://www.iana.org/domains/example">More information...</a></p>
</div>


</body></html>

Verbose output

Renders more details about the request and the response.

domcurl -v [url]

> GET / 
> Host: example.com
> upgrade-insecure-requests: 1
> user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/66.0.3347.0 Safari/537.36
< date: Wed, 28 Feb 2018 03:04:47 GMT
< content-encoding: gzip
< last-modified: Fri, 09 Aug 2013 23:54:35 GMT
< server: ECS (oxr/837E)
< etag: "1541025663+gzip"
< vary: Accept-Encoding
< x-cache: HIT
< content-type: text/html
< status: 200
< cache-control: max-age=604800
< content-length: 606
< expires: Wed, 07 Mar 2018 03:04:47 GMT
<!DOCTYPE html><html><head>
    <title>Example Domain</title>

    <meta charset="utf-8">
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style type="text/css">
    body {
        background-color: #f0f0f2;
        margin: 0;
        padding: 0;
        font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
        
    }
    div {
        width: 600px;
        margin: 5em auto;
        padding: 50px;
        background-color: #fff;
        border-radius: 1em;
    }
    a:link, a:visited {
        color: #38488f;
        text-decoration: none;
    }
    @media (max-width: 700px) {
        body {
            background-color: #fff;
        }
        div {
            width: auto;
            margin: 0 auto;
            border-radius: 0;
            padding: 1em;
        }
    }
    </style>    
</head>

<body>
<div>
    <h1>Example Domain</h1>
    <p>This domain is established to be used for illustrative examples in documents. You may use this
    domain in examples without prior coordination or asking for permission.</p>
    <p><a href="http://www.iana.org/domains/example">More information...</a></p>
</div>


</body></html>

Send output to a file

domcurl --url https://example.com -o test.txt

or

domcurl --url https://example.com --output test.txt

Set a custom header

domcurl --url https://example.com -H 'x-test:test1' -H 'x-test2:http://test.com'

Set a cookie

Sets a cookie on the request. It must be a valid Cookie string.

domcurl [url] -b "test=hello; Domain=airhorner.com; HttpOnly;"

Unlike cUrl you can multiple cookies by appending more -b arguments

domcurl [url] -b "test=hello; Domain=airhorner.com; HttpOnly;" -b "hello=world; Domain=airhorner.com; HttpOnly;"

Specify a request timeout

By default the command will timeout after 30 seconds. You can specify how long the command will wait before it errors.

domcurl --url https://example.com -m 60

or

domcurl --url https://example.com --max-time 60

Specify a trace file

Output a Chrome DevTools trace file (including screenshots.)

domcurl --url https://example.com --trace test.json

Using as a module

npm i domcurl

` const {domcurl} = require('domcurl');

domcurl(https://paul.kinlan.me/, {}); `

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].