@quenty/httppromise 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [6.5.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/httppromise@6.4.0...@quenty/httppromise@6.5.0) (2023-03-31)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add HttpPromise.isHttpResponse(value) ([4a654aa](https://github.com/Quenty/NevermoreEngine/commit/4a654aac55937205d4636138980d2df9094440e5))
12
+
13
+
14
+
15
+
16
+
6
17
  # [6.4.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/httppromise@6.3.0...@quenty/httppromise@6.4.0) (2023-03-05)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/httppromise
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2014-2022 Quenty
3
+ Copyright (c) 2014-2023 James Onnen (Quenty)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/httppromise",
3
- "version": "6.4.0",
3
+ "version": "6.5.0",
4
4
  "description": "HttpPromise - Wrapper functions around http requests in Roblox.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -28,10 +28,10 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "@quenty/loader": "^6.2.0",
31
- "@quenty/promise": "^6.3.0"
31
+ "@quenty/promise": "^6.4.0"
32
32
  },
33
33
  "publishConfig": {
34
34
  "access": "public"
35
35
  },
36
- "gitHead": "e62b5eac2e5d9084ab9083f128452dd2d98b6f1a"
36
+ "gitHead": "2a1c35a8d2e90b291a83a6e2def0ec69f3f24837"
37
37
  }
@@ -79,6 +79,21 @@ function HttpPromise.request(request)
79
79
  end)
80
80
  end
81
81
 
82
+ --[=[
83
+ Returns true if the value is an HttpResponse
84
+
85
+ @param value any
86
+ @return boolean
87
+ ]=]
88
+ function HttpPromise.isHttpResponse(value)
89
+ return type(value) == "table"
90
+ and type(value.Success) == "boolean"
91
+ and type(value.StatusCode) == "number"
92
+ and type(value.StatusMessage) == "string"
93
+ and type(value.Headers) == "table"
94
+ and type(value.Body) == "string"
95
+ end
96
+
82
97
  --[=[
83
98
  Makes a GET JSON request and then expects JSON as a result from said request
84
99