-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for body raw language
- Loading branch information
Showing
7 changed files
with
174 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
package postman | ||
|
||
// These constants represent the available raw languages. | ||
const ( | ||
HTML string = "html" | ||
Javascript string = "javascript" | ||
JSON string = "json" | ||
Text string = "text" | ||
XML string = "xml" | ||
) | ||
|
||
// Body represents the data usually contained in the request body. | ||
type Body struct { | ||
Mode string `json:"mode"` | ||
Raw string `json:"raw,omitempty"` | ||
URLEncoded interface{} `json:"urlencoded,omitempty"` | ||
FormData interface{} `json:"formdata,omitempty"` | ||
File interface{} `json:"file,omitempty"` | ||
GraphQL interface{} `json:"graphql,omitempty"` | ||
Disabled bool `json:"disabled,omitempty"` | ||
Mode string `json:"mode"` | ||
Raw string `json:"raw,omitempty"` | ||
URLEncoded interface{} `json:"urlencoded,omitempty"` | ||
FormData interface{} `json:"formdata,omitempty"` | ||
File interface{} `json:"file,omitempty"` | ||
GraphQL interface{} `json:"graphql,omitempty"` | ||
Disabled bool `json:"disabled,omitempty"` | ||
Options *BodyOptions `json:"options,omitempty"` | ||
} | ||
|
||
// BodyOptions holds body options. | ||
type BodyOptions struct { | ||
Raw BodyOptionsRaw `json:"raw,omitempty"` | ||
} | ||
|
||
// BodyOptionsRaw represents the acutal language to use in postman. (See possible options in the cost above) | ||
type BodyOptionsRaw struct { | ||
Language string `json:"language,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters