You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"number": 20
}
Getting HTTP Error 500 from the server, Is this error related to input data format?
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 764, in attack
_sting(param)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 383, in _sting
response = urlopen(request)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 171, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 500, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 612, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 538, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 620, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
Can someone please help me in correcting the input data file or share a sample post request with sample input data.
The text was updated successfully, but these errors were encountered:
Typically, in HTTP, you send the header: "Accept: /", not "Accept:/"
Regardless of the Accept header provided, your request will not work because the site referenced expects application/x-www-form-urlencoded input, notapplication/json, in which case your sample input should be something like number=20.
All of that said, this is not an issue with the code-base of this application. This is an issue related to improper usage.
How to make bees attack command for the below scenario:
POST HTTP request with input data(sample.json)
bees attack -n 100 -c 100 -XPOST -u 'http://qainterview.pythonanywhere.com/' -H Accept:/ -P application/json -p sample.json
and sample.json has below input data
{
"number": 20
}
Getting HTTP Error 500 from the server, Is this error related to input data format?
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 764, in attack
_sting(param)
File "build/bdist.linux-x86_64/egg/beeswithmachineguns/bees.py", line 383, in _sting
response = urlopen(request)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 171, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 500, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 612, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 538, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 466, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/dist-packages/future-0.16.0-py2.7.egg/future/backports/urllib/request.py", line 620, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
HTTPError: HTTP Error 500: Internal Server Error
Can someone please help me in correcting the input data file or share a sample post request with sample input data.
The text was updated successfully, but these errors were encountered: