Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/almirjnr/gurl
curl but written in go
https://github.com/almirjnr/gurl
curl golang
Last synced: 21 days ago
JSON representation
curl but written in go
- Host: GitHub
- URL: https://github.com/almirjnr/gurl
- Owner: AlmirJNR
- Created: 2024-06-19T03:06:19.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-06-19T03:19:52.000Z (5 months ago)
- Last Synced: 2024-10-15T17:33:16.849Z (21 days ago)
- Topics: curl, golang
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gurl (wip)
`curl` but written in `go`
## http requests
`gurl` haves many options to send your http data to servers, you can use the conventional methods:
POST, GET, PUT, PATCH, DELETE, HEAD and OPTIONS## flags
- --request [POST | GET | PUT | PATCH | DELETE | HEAD | OPTIONS] string
- base identifier of http method request, proceeded by the url
- --header string
- header values to be passed
- --data [string | key=value]
- data values or key/values to be passed,
generally values if json and key/values if form data
- --file key=value
- file field and value to be passed with the form data content type
- --verbose
- tells the application that it should print on the stdout with all content from the response, not only the body## usage examples
```shell
gurl --request GET {URL}
``````shell
gurl --request GET {URL} \
--header 'Authorization: bearer {TOKEN}'
``````shell
gurl --request POST {URL} \
--header 'Content-Type: application/json' \
--header 'Authorization: bearer {TOKEN}' \
--data '{"name": "Almir", "job": "Developer"}'
``````shell
gurl --request POST {URL} \
--header 'Content-Type: multipart/form-data' \
--header 'Authorization: bearer {TOKEN}' \
--data name=Almir \
--data job=Developer \
--data age=23 \
--file genericFile={FILE_PATH} \
--file genericFile2={FILE_PATH_2}
```