gsqlcmd Web Request Options

gsqlcmd Web Request Options

/accept=<accept>

Use this option to set the Accept header for web requests.

Example:

/accept=application/json;odata=verbose

You can also set a default value in the configuration file:

<add key="Accept" value="application/json;odata=verbose"/>

/acceptEncoding=<value>

Use this option to set the Accept-Encoding header for web requests.

Example:

/acceptEncoding=gzip,deflate

/contentType=<contentType>

Use this option to set the Content-Type header for web requests.

Example:

/contentType=application/json

Refer to RFC 7231, section 3.1.1.5: Content-Type for more details.

/delay=<milliseconds>

Use this option to set a delay between requests to avoid getting banned by web servers.

Example: To limit to two requests per second, specify 500 milliseconds:

/delay=500

The default value is 200 milliseconds, allowing for five requests per second.

In batch files with a single request per cycle, use the sleep mode.

/header=<header>

Use this option to add custom request headers.

Example:

/header="Authorization: Bearer 12345"

To add multiple headers, use this option multiple times.

/method=AUTO | GET | POST | PUT | PATCH | MERGE | DELETE | HEAD

Use this option to specify the web request method: AUTO, GET, POST, PUT, PATCH, MERGE, DELETE, or HEAD.

Example:

gsqlcmd download https://localhost/crm/contacts?id=1 /method=DELETE

The default method is GET. If the /postData option is provided, the default method changes to POST.

/pages=<pages>

Use this option to define the number of pages to load (e.g., the number of option chain pages).

Example:

/pages=5

This option is effective if the utility can detect next page URLs.

/pageNumberDigits=<pageNumberDigits>

Use this option to specify the number of digits in the output file page number.

Example:

/pageNumberDigits=2

In this case, if you name the output file AAPL.json, the tool will save downloaded pages as AAPL-01.json, AAPL-02.json, and so on.

/postData=<string> | <file name>

Use this option to define the data for web requests using POST, PUT, PATCH, MERGE, or DELETE methods.

Example:

gsqlcmd download https://localhost/crm/contacts /method=POST /postData=contact.json

If the /postData option has a value, the POST method is used by default.

/referrer=<Referrer header value>

Use this option to set the Referrer header value for the web request.

Example:

/referrer=https://www.msn.com/en-us/money/

Note that the HTTP header is originally misspelled as "referer."
gsqlcmd accepts both forms: /referer and /referrer.

/timeout=<milliseconds>

Use this option to set the timeout for web requests.

The default timeout is 100 seconds (100,000 ms).

Example:

/timeout=10000

/userAgent=<user agent>

Use this option to set the User-Agent header for web requests.

Example:

/UserAgent=gsqlcmd 6.0

You can also set a default value in the configuration file:

<add key="UserAgent" value="gsqlcmd 6.0"/>

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.