-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Universal Web
committed
Aug 10, 2023
1 parent
23f8816
commit 010e9bf
Showing
2 changed files
with
17 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { | ||
success, failed, imported, msgSent, info | ||
} from '#logs'; | ||
import { promise, construct, isString } from '@universalweb/acid'; | ||
imported('Request'); | ||
export async function post(url, data, options = {}) { | ||
info(`POST => ${url}`); | ||
options.method = 'post'; | ||
const source = { | ||
url, | ||
data, | ||
}; | ||
const request = await this.request(source, options); | ||
return request.send(); | ||
} |