Skip to main content

DotURL: Http Client Tool

The DotHRB DotURL command-line tool provides a powerful, code-free way to execute HTTP REST operations directly from your terminal. It's ideal for testing APIs, automation scripting, and quick network requests.

Usage Syntax

doturl [options] <json file | "json string">

The tool accepts either a JSON file containing commands or a JSON string defining a single operation.


1. ⚙️ Core Options and Output Control

These options manage help, verbosity, and the formatting of the output.

OptionShorthandDescription
-h / -help(None)Display the help documentation.
(None)-vEnable Verbose output for detailed request/response logging.
(None)-oSet an output file path to save the response content.
-p <s|h|b>(None)Control the print output components: r (Status), h (Headers), b (Body). Default is to print all three.
--license(None)Display license and copyright information.
--version(None)Display the tool version number.

2. ⌨️ Command History

These commands are used for accessing command history.

CommandDescription
:List the history of log entries (previous commands).
:? <search>List log entries that contain the specified <search> string.
:<n>Recall and execute log entry number <n>.
:$Recall and execute the last log entry.
:@<template>Recall a template**.

3. 📝 Practical Examples

These examples demonstrate how to execute operations using external files or inline JSON strings.

ScenarioCommandPurpose
Execute Command Filedoturl myscript.jsonExecutes the set of defined HTTP requests contained within the JSON file.
Inline JSON GETdoturl '{"cmd":"post","url":"http://localhost","headers":"..."}'Executes an HTTP GET operation
Inline JSON POSTdoturl '{"cmd":"post","url":"http://localhost","body":"...", "headers":"..."}'Executes an HTTP POST operation using an inline JSON string definition.