File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 1+ # Auto detect text files and perform LF normalization
2+ * text =auto
3+
4+ # Custom for Visual Studio
5+ * .cs diff =csharp
6+ * .sln merge =union
7+ * .csproj merge =union
8+ * .vbproj merge =union
9+ * .fsproj merge =union
10+ * .dbproj merge =union
11+
12+ # Standard to msysgit
13+ * .doc diff =astextplain
14+ * .DOC diff =astextplain
15+ * .docx diff =astextplain
16+ * .DOCX diff =astextplain
17+ * .dot diff =astextplain
18+ * .DOT diff =astextplain
19+ * .pdf diff =astextplain
20+ * .PDF diff =astextplain
21+ * .rtf diff =astextplain
22+ * .RTF diff =astextplain
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ Attribute VB_Name = "RestRequestSpecs"
1313Public Function Specs () As SpecSuite
1414 Set Specs = New SpecSuite
1515 Dim Request As RestRequest
16+ Dim Body As Object
1617
1718 Specs.Description = "RestRequest"
1819
@@ -132,8 +133,7 @@ Public Function Specs() As SpecSuite
132133
133134 With Specs.It("should only combine body and parameters if not GET Request" )
134135 Set Request = New RestRequest
135-
136- Dim Body As Object
136+
137137 Set Body = CreateObject("Scripting.Dictionary" )
138138 Body.Add "A" , 123
139139
@@ -243,5 +243,22 @@ Public Function Specs() As SpecSuite
243243 .Expect(Request.FormattedResource).ToEqual "?A=20&B=3.14&C=True"
244244 End With
245245
246+ With Specs.It("should allow body or body string for GET requests" )
247+ Set Request = New RestRequest
248+ Request.Method = httpGET
249+
250+ Set Body = CreateObject("Scripting.Dictionary" )
251+ Body.Add "A" , 123
252+
253+ Request.AddBody Body
254+ .Expect(Request.Body).ToEqual "{""A"":123}"
255+
256+ Set Request = New RestRequest
257+ Request.Method = httpGET
258+
259+ Request.AddBodyString "Howdy!"
260+ .Expect(Request.Body).ToEqual "Howdy!"
261+ End With
262+
246263 InlineRunner.RunSuite Specs
247264End Function
You can’t perform that action at this time.
0 commit comments