Skip to content

Commit

Permalink
feat(rest): progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Smart committed Mar 18, 2022
1 parent 3fd8f93 commit 32ecc45
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
7 changes: 7 additions & 0 deletions DiscordREST/http.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as T from "@effect-ts/core/Effect"
import * as Axios from "axios"

export const request =
<A>(axios: Axios.AxiosInstance) =>
(config: Axios.AxiosRequestConfig) =>
T.tryCatchPromise(() => axios.request<A>(config), onReject)
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
"@effect-ts/core": "^0.58.0",
"@effect-ts/node": "^0.38.3",
"@effect-ts/system": "^0.55.0",
"callbag-effect-ts": "^0.7.7",
"axios": "^0.26.1",
"callbag-effect-ts": "^0.8.0",
"tslib": "^2.3.1",
"ws": "^8.5.0"
},
Expand Down
20 changes: 16 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,22 @@ arg@^4.1.0:
resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089"
integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==

axios@^0.26.1:
version "0.26.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.1.tgz#1ede41c51fcf51bbbd6fd43669caaa4f0495aaa9"
integrity sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==
dependencies:
follow-redirects "^1.14.8"

boolbase@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=

callbag-effect-ts@^0.7.7:
version "0.7.7"
resolved "https://registry.yarnpkg.com/callbag-effect-ts/-/callbag-effect-ts-0.7.7.tgz#8a7f44cd720eda35d1c0b83eceb8c6e162811a14"
integrity sha512-EbPhIECZ8O86N9J/2gW9KbKUvJK94jOXkz/8+hp9NrVMNKT7/qEFnD/VzrOpGz8yxDrqEerAAGOayy6i90uCNQ==
callbag-effect-ts@^0.8.0:
version "0.8.0"
resolved "https://registry.yarnpkg.com/callbag-effect-ts/-/callbag-effect-ts-0.8.0.tgz#8a1cd17a63f1dee53dbda67db4b47fdc018a084f"
integrity sha512-iDmIV+B5rTJxlYYgrCSynqEn8BTrgO2wR/GXKyph6hBYRh4392bMrNrROxqV1YCuWBeBNC14s+T0P0Nc3/RinQ==
dependencies:
"@effect-ts/core" "^0.58.0"
callbag-filter "^1.1.0"
Expand Down Expand Up @@ -298,6 +305,11 @@ escalade@^3.1.1:
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==

follow-redirects@^1.14.8:
version "1.14.9"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.9.tgz#dd4ea157de7bfaf9ea9b3fbd85aa16951f78d8d7"
integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==

fp-ts@^2.10.5:
version "2.11.8"
resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-2.11.8.tgz#411cde116c446d568f5597b03352d8b3f98e8f82"
Expand Down

0 comments on commit 32ecc45

Please sign in to comment.