http2curl:将Golang的http.Request转换为CURL命令行

时间:2024-05-19 19:46:12
【文件属性】:

文件名称:http2curl:将Golang的http.Request转换为CURL命令行

文件大小:26KB

文件格式:ZIP

更新时间:2024-05-19 19:46:12

Makefile

http2curl :triangular_ruler: 将Golang的http.Request转换为CURL命令行 要执行相反的操作,请检出 。 例子 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 . Printl


【文件预览】:
http2curl-master
----.releaserc.js(200B)
----LICENSE-MIT(1KB)
----LICENSE-APACHE(11KB)
----internal()
--------tools()
----doc.go(18B)
----.github()
--------dependabot.yml(405B)
--------renovate.json(84B)
--------FUNDING.yml(131B)
--------PULL_REQUEST_TEMPLATE.md(49B)
--------ISSUE_TEMPLATE()
--------workflows()
--------CONTRIBUTING.md(306B)
--------CODE_OF_CONDUCT.md(3KB)
--------CODEOWNERS(8B)
----tool()
--------lint()
----COPYRIGHT(782B)
----AUTHORS(629B)
----.gitignore(320B)
----Makefile(56B)
----go.sum(4KB)
----http2curl_test.go(4KB)
----README.md(3KB)
----rules.mk(10KB)
----.gitattributes(309B)
----http2curl.go(1KB)
----go.mod(111B)

网友评论