Skip to content

Commit ffecd3e

Browse files
committed
Changed noHeader parameter to no_header to keep with the pattern previously established. Updated documentation to include this parameter.
1 parent 247b346 commit ffecd3e

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,9 @@ The current functionality is pretty simple. Simply POST any message to root of t
2626

2727
Query Parameter | Description
2828
:--------------:|:-----------
29-
dir | Override the name of the directory your request is written to. This can be used to group requests in a single location
30-
status_code | Force the http status code on the response. Useful for testing error conditions
29+
dir | Override the name of the directory your request is written to. This can be used to group requests in a single location.
30+
no_header | Do not return the headers at the top of the response. This will try to set the content-type of the response based on the stored header if possible.
31+
status_code | Force the http status code on the response. Useful for testing error conditions.
3132

3233
An example post would be:
3334
```

‎gobble.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ func showFiles(c *gin.Context) {
103103
// Adds the file to the response. A noHeader query parameter will cause the headers to be stripped
104104
// prior to adding them to the response.
105105
func showFile(c *gin.Context, fileName string) {
106-
if _, exists := c.GetQuery("noHeader"); exists {
106+
if _, exists := c.GetQuery("no_header"); exists {
107107
fileBytes, _ := ioutil.ReadFile(fileName)
108108
splitBytes := bytes.SplitN(fileBytes, []byte("\n\n"), 2)
109109

0 commit comments

Comments
 (0)