Socket
Socket
Sign inDemoInstall

tcp-http-client

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.5 to 1.0.6

2

package.json
{
"name": "tcp-http-client",
"version": "1.0.5",
"version": "1.0.6",
"description": "Basic Http client using built in net and tls modules",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -14,3 +14,4 @@ # TCP-Http-Client

```javascript
const {TCPHttpClient, TCPHttpRequest} = require('tcp-http-client');
const {TCPHttpClient, TCPHttpRequest, TCPHttpMethod} = require('tcp-http-client');
const { URL } = require('url');

@@ -17,0 +18,0 @@ const client = new TCPHttpClient();

@@ -8,3 +8,3 @@ const { URL } = require('url');

this.content = null;
this.httpMethod = httpMethod;
this.httpMethod = this.checkHttpMethod(httpMethod);
this.keepAlive = true;

@@ -26,2 +26,11 @@ this.addHeader("host", url.hostname)

checkHttpMethod(httpMethod){
if (Object.values(TCPHttpMethod).includes(httpMethod)){
return httpMethod;
}
else {
throw new Error("Invalid Http Method Specified");
}
}
addCookie(cookieName, cookieValue){

@@ -28,0 +37,0 @@ this.cookies.push({ name: cookieName, value: cookieValue })

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc