curl2steps

command
v0.2.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: MIT Imports: 11 Imported by: 0

README

curl2steps

This tool converts curl command to steps.

Install

go install github.com/godogx/httpsteps/cmd/curl2steps@latest

Examples

curl2steps my_service curl -d '{"key1":"value1", "key2":"value2"}' -H "Content-Type: application/json" -X POST http://localhost:3000/data
    When I request "my_service" HTTP endpoint with method "POST" and URI "/data"
    And I request "my_service" HTTP endpoint with headers
        | Content-Type | application/json |
    And I request "my_service" HTTP endpoint with body
    ```json
    {"key1":"value1", "key2":"value2"}
    ```
curl2steps my_service curl -d "param1=value1&param2=value2" -X POST http://localhost:3000/data
    When I request "my_service" HTTP endpoint with method "POST" and URI "/data"
    And I request "my_service" HTTP endpoint with headers
        | Content-Type | application/x-www-form-urlencoded |
    And I request "my_service" HTTP endpoint with urlencoded form data
        | param1 | value1 |
        | param2 | value2 |

Documentation

Overview

Package main is a CLI tool to generate steps from curl command.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL