-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from studio-b12/dev-v1.3.0
v1.3.0
- Loading branch information
Showing
23 changed files
with
501 additions
and
71 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
POST {{.instance}}/ | ||
|
||
[PreScript] | ||
var number = 123.5 | ||
|
||
[Body] | ||
$number |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
POST {{.instance}}/ | ||
|
||
[PreScript] | ||
var text = "test text" | ||
|
||
[FormData] | ||
file = $text |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
goat body_fail.goat && { | ||
echo "should have failed but didn't" | ||
exit 1 | ||
} | ||
|
||
goat formdata_fail.goat && { | ||
echo "should have failed but didn't" | ||
exit 1 | ||
} | ||
|
||
exit 0 |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
POST {{.instance}}/ | ||
|
||
[PreScript] | ||
var binaryBody = new Uint8Array(4); | ||
binaryBody[0] = 0x67; | ||
binaryBody[1] = 0x6f; | ||
binaryBody[2] = 0x61; | ||
binaryBody[3] = 0x74; | ||
|
||
[Body] | ||
$binaryBody | ||
|
||
[Script] | ||
assert_eq(response.Body.body_string, '\x67\x6f\x61\x74'); | ||
|
||
--- | ||
// With manually set Content-Type | ||
POST {{.instance}}/ | ||
|
||
[PreScript] | ||
var binaryBody = new Uint8Array(4); | ||
binaryBody[0] = 0x67; | ||
binaryBody[1] = 0x6f; | ||
binaryBody[2] = 0x61; | ||
binaryBody[3] = 0x74; | ||
|
||
[Body] | ||
$binaryBody:text/plain | ||
|
||
[Script] | ||
assert_eq(response.Body.body_string, '\x67\x6f\x61\x74'); | ||
var contentType = response.Body.headers["Content-Type"]; | ||
assert(contentType, 'text/plain', `Invalid Content-Type header: ${contentType}`); |
Oops, something went wrong.