diff options
| author | Jeff Carr <[email protected]> | 2024-12-14 10:47:08 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-14 10:47:08 -0600 |
| commit | dead6fe01f7599fc3b6a6b1ee77a9e69e7b325d1 (patch) | |
| tree | e28026f0e331b4c7e80e3fb83f92e191298953eb /jsonClient.go | |
| parent | 0775662416320c07651061e6e59b0cae217a9e2b (diff) | |
new args. use forgepb for versions and dates
Diffstat (limited to 'jsonClient.go')
| -rw-r--r-- | jsonClient.go | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/jsonClient.go b/jsonClient.go index 4dc9b10..aa2e450 100644 --- a/jsonClient.go +++ b/jsonClient.go @@ -17,8 +17,8 @@ type RequestInfo struct { Headers map[string][]string `json:"headers"` Cookies map[string]string `json:"cookies"` QueryParams map[string][]string `json:"queryParams"` + Body string `json:"body"` // Add other fields as needed - Body string `json:"body"` } // dumpClient returns a string with JSON formatted http.Request information @@ -68,41 +68,3 @@ func dumpJsonClient(r *http.Request) (string, error) { return string(formattedJSON), nil } - -/* -package main - -import ( - "bytes" - "encoding/json" - "io" - "io/ioutil" - "net/http" -) - -type RequestInfo struct { - // ... (other fields) - Body string `json:"body"` - // ... (other fields) -} - -func dumpClient(r *http.Request) (string, error) { - // ... (rest of your code to collect other request info) - - info := RequestInfo{ - // ... (other fields) - Body: string(bodyBytes), - // ... (other fields) - } - - // Marshal the struct to a JSON string - jsonString, err := json.Marshal(info) - if err != nil { - return "", err - } - - return string(jsonString), nil -} - -// ... (rest of your code) -*/ |
