https://github.com/joegasewicz/multipart-requests
Http multipart form data requests
https://github.com/joegasewicz/multipart-requests
http http-requests multipart multipart-formdata request
Last synced: about 1 month ago
JSON representation
Http multipart form data requests
- Host: GitHub
- URL: https://github.com/joegasewicz/multipart-requests
- Owner: joegasewicz
- License: mit
- Created: 2023-01-25T21:28:31.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-06-25T12:11:10.000Z (almost 2 years ago)
- Last Synced: 2025-04-10T13:34:13.422Z (about 1 month ago)
- Topics: http, http-requests, multipart, multipart-formdata, request
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Multipart Requests
Http multipart form data requests### Install
```
go get -u github.com/joegasewicz/multipart-requests
```### Usage
Upload the file as multipart form data within a http request
```go
m := multipart_requests.MultipartRequest{
TempPath: "uploads", // Default is temp
Persist: true, // Default is false
Url: "http://127.0.0.1:8000/example", // Required
Debug: true, // Default is false
}
// If a file is being obtained via a form request then use this helper
fileName, file, err := m.GetFile(r, "logo")
// Upload the file as multipart form data within a http request
_, err = m.Upload(file, *fileName, "logo")
```