moul / Http2curl
Licence: other
📐 Convert Golang's http.Request to CURL command line
Stars: ✭ 278
Labels
Projects that are alternatives of or similar to Http2curl
Packages
Community maintained packages for OpenWrt. Documentation for submitting pull requests is in CONTRIBUTING.md
Stars: ✭ 2,957 (+963.67%)
Mutual labels: makefile
Sshb0t
A bot for keeping your ssh authorized_keys up to date with user's GitHub keys, **only** use if you enable 2FA & keep your keys updates.
Stars: ✭ 260 (-6.47%)
Mutual labels: makefile
Crystal Book
Crystal docs at https://crystal-lang.org/reference
Stars: ✭ 275 (-1.08%)
Mutual labels: makefile
Arm Eabi Toolchain
Makefile & supporting patches/scripts to build a bare metal ARM EABI toolchain.
Stars: ✭ 259 (-6.83%)
Mutual labels: makefile
Routeros Scripts
a collection of scripts for Mikrotik RouterOS
Stars: ✭ 270 (-2.88%)
Mutual labels: makefile
React Native Snippets
✏️ A collection of React Native snippets for Sublime Text and Atom
Stars: ✭ 257 (-7.55%)
Mutual labels: makefile
Docker To Linux
Make bootable Linux disk image abusing Docker
Stars: ✭ 257 (-7.55%)
Mutual labels: makefile
Cookiecutter Docker Science
Cookiecutter template for data scientists working with Docker containers
Stars: ✭ 267 (-3.96%)
Mutual labels: makefile
Archwsl
ArchLinux based WSL Distribution. Supports multiple install.
Stars: ✭ 3,667 (+1219.06%)
Mutual labels: makefile
Face recognition models
Trained models for the face_recognition python library
Stars: ✭ 254 (-8.63%)
Mutual labels: makefile
Displaylink Rpm
RPM sources for the DisplayLink USB display adapters
Stars: ✭ 266 (-4.32%)
Mutual labels: makefile
Evm Semantics
K Semantics of the Ethereum Virtual Machine (EVM)
Stars: ✭ 275 (-1.08%)
Mutual labels: makefile
Packpack
Simple building of RPMs & Debian packages from git repos
Stars: ✭ 269 (-3.24%)
Mutual labels: makefile
http2curl
📐 Convert Golang's http.Request to CURL command line
To do the reverse, check out mholt/curl-to-go.
Example
import (
"http"
"moul.io/http2curl"
)
data := bytes.NewBufferString(`{"hello":"world","answer":42}`)
req, _ := http.NewRequest("PUT", "http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu", data)
req.Header.Set("Content-Type", "application/json")
command, _ := http2curl.GetCurlCommand(req)
fmt.Println(command)
// Output: curl -X PUT -d "{\"hello\":\"world\",\"answer\":42}" -H "Content-Type: application/json" http://www.example.com/abc/def.ghi?jlk=mno&pqr=stu
Install
$ go get moul.io/http2curl
Usages
- https://github.com/parnurzeal/gorequest
- https://github.com/scaleway/scaleway-cli
- https://github.com/nmonterroso/cowsay-slackapp
- https://github.com/moul/as-a-service
- https://github.com/gavv/httpexpect
- https://github.com/smallnest/goreq
License
© 2019 Manfred Touron
Licensed under the Apache License, Version 2.0 (LICENSE-APACHE
) or the MIT license (LICENSE-MIT
), at your option. See the COPYRIGHT
file for more details.
SPDX-License-Identifier: (Apache-2.0 OR MIT)
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].