We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does it make sense to use the http provider's native implementation instead of using "axios"?
import https, { RequestOptions } from 'node:https'; import http from 'node:http'; import { Log, Step } from 'ts-logs'; const log = Log.init({ name: 'Test' }); log.addStep(Step.create({})); const data = JSON.stringify(log); const url = new URL('http://localhost:3001/test-002'); const options: RequestOptions = { hostname: url.hostname, port: url.port, path: url.pathname, method: 'POST', protocol: url.protocol, headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data), }, } const isHttps = url.protocol === 'https:' || url.port === '443' || url.href.includes('https://'); const request = isHttps ? https.request(options) : http.request(options); request.write(data); request.end();
The text was updated successfully, but these errors were encountered:
4lessandrodev
No branches or pull requests
Deprecate "axios" in favor of native http?
Does it make sense to use the http provider's native implementation instead of using "axios"?
The text was updated successfully, but these errors were encountered: