
import json
import requests

class Http:

	def sendRequest(url):
		payload = requests.get(str(url))
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode == 403:
			return print("[Roblox][GET] Something went wrong. Error: 403")
		return content

	def postRequest(url,param1,param2):
		payload = requests.post(str(url), data = {str(param1):str(param2)})
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode == 403:
			return print("[Roblox][POST] Something went wrong. Error: 403")
		return content

import json
import requests

class Http:

	def sendRequest(url):
		payload = requests.get(str(url))
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode is not 200:
			return print("[Roblox][GET] Something went wrong. Error: "+statusCode)
		return content

	def postRequest(url,param1,param2):
		payload = requests.post(str(url), data = {str(param1):str(param2)})
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode is not 200:
			return print("[Roblox][POST] Something went wrong. Error: "+statusCode)
		return content

Check this commits description for more information
[Http] Check this commits description for more information

- sendRequest() and postRequest now have better error handling and display the error via console
- No longer toggles error on 403, instead it toggles everything but 200
  
  import json
  import requests
  
  class Http:
  
  	def sendRequest(url):
  		payload = requests.get(str(url))
  		statusCode = payload.status_code
  		header = payload.headers
  		content = payload.content
- 		if statusCode == 403:
+ 		if statusCode is not 200:
- 			return print("[Roblox][GET] Something went wrong. Error: 403")
+ 			return print("[Roblox][GET] Something went wrong. Error: "+statusCode)
  		return content
  
  	def postRequest(url,param1,param2):
  		payload = requests.post(str(url), data = {str(param1):str(param2)})
  		statusCode = payload.status_code
  		header = payload.headers
  		content = payload.content
- 		if statusCode == 403:
+ 		if statusCode is not 200:
- 			return print("[Roblox][POST] Something went wrong. Error: 403")
+ 			return print("[Roblox][POST] Something went wrong. Error: "+statusCode)
- 		return content
+ 		return content
+ 
Check this commits description for more information
## Code Before:

import json
import requests

class Http:

	def sendRequest(url):
		payload = requests.get(str(url))
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode == 403:
			return print("[Roblox][GET] Something went wrong. Error: 403")
		return content

	def postRequest(url,param1,param2):
		payload = requests.post(str(url), data = {str(param1):str(param2)})
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode == 403:
			return print("[Roblox][POST] Something went wrong. Error: 403")
		return content
## Instruction:
Check this commits description for more information
## Code After:

import json
import requests

class Http:

	def sendRequest(url):
		payload = requests.get(str(url))
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode is not 200:
			return print("[Roblox][GET] Something went wrong. Error: "+statusCode)
		return content

	def postRequest(url,param1,param2):
		payload = requests.post(str(url), data = {str(param1):str(param2)})
		statusCode = payload.status_code
		header = payload.headers
		content = payload.content
		if statusCode is not 200:
			return print("[Roblox][POST] Something went wrong. Error: "+statusCode)
		return content
