All Projects → fabiofalci → gohit

fabiofalci / gohit

Licence: Apache-2.0 license
Run curl commands from yaml files

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to gohit

icingaweb2-module-fileshipper
Provide CSV, JSON, XML and YAML files as an Import Source for the Icinga Director and optionally ship hand-crafted additional Icinga2 config files
Stars: ✭ 25 (+31.58%)
Mutual labels:  yaml
Speedport-Plus-Cosmote-Router-hacks
Exploring the Sercomm made router of Cosmote - OTE Group (Deutsche Telekom in Greece)
Stars: ✭ 64 (+236.84%)
Mutual labels:  curl
pipeline
Spline is a tool that is capable of running locally as well as part of well known pipelines like Jenkins (Jenkinsfile), Travis CI (.travis.yml) or similar ones.
Stars: ✭ 29 (+52.63%)
Mutual labels:  yaml
easyhttp
EasyHttp 是一个轻量级、语义化、对IDE友好的HTTP客户端,支持常见的HTTP请求、异步请求和并发请求,让你可以快速地使用 HTTP 请求与其他 Web 应用进行通信。
Stars: ✭ 31 (+63.16%)
Mutual labels:  curl
guile-curl
A language binding for the CURL network client library for the Guile version of the Scheme language
Stars: ✭ 23 (+21.05%)
Mutual labels:  curl
curl2ab
Convert cURL command line to ab (apache bench)
Stars: ✭ 22 (+15.79%)
Mutual labels:  curl
obp-apis
OpenBankingProject.ch Community APIs
Stars: ✭ 18 (-5.26%)
Mutual labels:  yaml
statics
Base class and modules for YAML backed static models.
Stars: ✭ 41 (+115.79%)
Mutual labels:  yaml
AUCR
Analyst Unknown Cyber Range - a micro web service framework
Stars: ✭ 24 (+26.32%)
Mutual labels:  yaml
ryaml
Python yaml library using Rust
Stars: ✭ 14 (-26.32%)
Mutual labels:  yaml
go-config
Configuration file loader for Go
Stars: ✭ 27 (+42.11%)
Mutual labels:  yaml
HsYAML
YAML 1.2 implementation in pure Haskell
Stars: ✭ 50 (+163.16%)
Mutual labels:  yaml
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 (+57.89%)
Mutual labels:  curl
1c http
Подсистема 1С для работы с HTTP
Stars: ✭ 48 (+152.63%)
Mutual labels:  curl
dynamic.yaml
DEPRECATED: YAML-based data transformations
Stars: ✭ 14 (-26.32%)
Mutual labels:  yaml
kahoy
Simple Kubernetes raw manifests deployment tool
Stars: ✭ 33 (+73.68%)
Mutual labels:  yaml
elk
🦌 Minimalist yaml based task runner
Stars: ✭ 43 (+126.32%)
Mutual labels:  yaml
bafi
Universal JSON, BSON, YAML, CSV, XML converter with templates
Stars: ✭ 65 (+242.11%)
Mutual labels:  yaml
curl
cURL command in full java. Any argument/option you need raise an issue here.
Stars: ✭ 103 (+442.11%)
Mutual labels:  curl
r2curl
Node.js Request Wrapper (axios, fetch, ..) to cURL Command String
Stars: ✭ 30 (+57.89%)
Mutual labels:  curl

gohit

Join the chat at https://gitter.im/gohit/Lobby

Run curl commands from yaml files.

Download current version 0.1.0

  • Define your API:
headers:
  - 'Accept: application/vnd.github.v3+json'

url: https://api.github.com

options:
  - '--compress'

endpoints:
  get_repo:
    path: /repos/{owner}/{repo}
  get_user:
    path: /users/{username}
    options:
      - '--silent'

requests:
  show_sconsify:
    endpoint: get_repo
    owner: fabiofalci
    repo: sconsify
  show_fabio:
    endpoint: get_user
    username: fabiofalci
  • Show requests:
$ gohit -f github.yaml requests
Request show_fabio:
curl https://api.github.com/users/fabiofalci \
        -H 'Accept: application/vnd.github.v3+json' \
        --compress \
        --silent \
        -XGET

Request show_sconsify:
curl https://api.github.com/repos/fabiofalci/sconsify \
        -H 'Accept: application/vnd.github.v3+json' \
        --compress \
        -XGET

  • Execute a request:
$ gohit -f github.yaml run show_sconsify
{
  "id": 21726337,
  "name": "sconsify",
  "full_name": "fabiofalci/sconsify",
  "network_count": 14,
  ....
  "subscribers_count": 24
}

yaml file spec

# list of files to be imported
files:
  - 'api.yaml'
  - 'api-security-token.yaml'

# list of global headers
headers:
  - 'Accept: application/vnd.github.v3+json'

# curl url
url: https://api.github.com

# list of any other curl option
options:
  - '--compress'

# global variables
variables:
  name: value1
  date: value2


# endpoint definitions
endpoints:

  # endpoint name
  get_repo:

    # endpoint path
    path: /repos/{owner}/{repo}

    # http method
    method: GET

    # query string
    query: name={name}&date={date}

    # list of headers
    headers:
      - 'Content-type: application/xml'

    # any other curl option
    options:
      - '--silent'

# request definitions
requests:

  # request name
  show_sconsify:

    # endpoint name
    endpoint: get_repo

    # local variables
    owner: fabiofalci
    repo: sconsify

Environments

You can define one basic api file and then import it from different environment files:

api.yaml

url: https://{env}.my-api.com

endpoints:
  get_something:
    path: /something/{id}

api-staging.yaml

files:
  - 'api.yaml'

variables:
  env: dev

requests:
  get_something_123:
    endpoint: get_something
    id: 123

api-uat.yaml

files:
  - 'api.yaml'

variables:
  env: uat

requests:
  get_something_456:
    endpoint: get_something
    id: 456
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].