Skip to content

Commit 9dbcc75

Browse files
sylvaindesvetimhall
authored andcommittedOct 4, 2019
Fixed "WebStatusCode" in the guides (#419)
* Fixed error in the basic usage example of VBA-Web. Fixed error in the basic usage example of VBA-Web. * Update get.md Fixed WebStatusCode in "GET request" page of the guides. * Update post.md Fixed WebStatusCode in "POST request" page of the guides.
1 parent 57a047f commit 9dbcc75

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed
 

‎docs/_guides/get.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Public Function GetProject(Id As Long) As Dictionary
3535
' ...
3636
' {"data":{"id":1,"name":"Project 1"}}
3737

38-
If Response.StatusCode = WebStatus.Ok Then
38+
If Response.StatusCode = WebStatusCode.Ok Then
3939
' json response is automatically parsed based Request.Format
4040
Set GetProject = Response.Data("data")
4141
End If
@@ -47,7 +47,7 @@ Public Function GetProject2(Id As Long) As Dictionary
4747
Dim Response As WebResponse
4848
Set Response = Client.GetJson("projects/" & Id)
4949

50-
If Response.StatusCode = WebStatus.Ok Then
50+
If Response.StatusCode = WebStatusCode.Ok Then
5151
Set GetProject2 = Response.Data("data")
5252
End If
5353
End Function

‎docs/_guides/overview.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Public Function GetProjects() As Collection
4848
' ...
4949
' {"data":[{"id":1,"name":"Project 1"},{"id":2,"name":"Project 2"}]}
5050

51-
If Response.StatusCode <> WebStatus.Ok Then
51+
If Response.StatusCode <> WebStatusCode.Ok Then
5252
Err.Raise Response.StatusCode, "GetProjects", Response.Content
5353
Else
5454
' Response is automatically converted to Dictionary/Collection by Request.Format

‎docs/_guides/post.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Public Function CreateProject(Project As Dictionary) As Long
2929
' ...
3030
' {"data":{"id":3,"name":"new Project"}}
3131

32-
If Response.StatusCode <> WebStatus.Created Then
32+
If Response.StatusCode <> WebStatusCode.Created Then
3333
Err.Raise Response.StatusCode, "CreateProject", _
3434
"Failed to create project: " & Response.Content
3535
Else
3636
' Return id of created project
3737
CreateProject = Response.Data("data")("id")
3838
End If
3939
End Sub
40-
```
40+
```

0 commit comments

Comments
 (0)
Please sign in to comment.