Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
http-test-client
Library to simplify writing HTTP REST service integration tests.
Allows to build a HTTP REST client with automatic resource cleanup.
.. code:: python
from http_test_client import Client, HttpTransport, RestResources, resources
class ArticleResources(RestResources):
def search(self, query):
return self._request('/search', method='POST', data={'query': query})
class Resource(RestResources.Resource):
def publish(self):
return self._request('/publish', method='POST')
comments = resources('/comments')
class MyClient(Client):
users = resources('/users')
articles = resources('/articles', ArticleResources)
client = MyClient(HttpTransport('http://localhost:8888'))
# managing resources
client.users.list() # => [{'id': '1', 'name': 'John'}, ...]
client.users.create({'name': 'Jane'}) # => {'id': '2'}
client.users['1'].get() # => {'id': '1', 'name': 'John'}
client.users['1'].delete()
# delete all resources that were created during this client session
client.cleanup()
# custom action
client.articles['123'].publish()
# nested resources
client.articles['123'].comments.list()
::
$ pip install http-test-client
requests <http://docs.python-requests.org/en/master/>
_ >= 2.14MIT licensed. See the bundled LICENSE <https://github.com/maximkulkin/http-test-client/blob/master/LICENSE>
_ file for more details.
FAQs
Library to simplify writing HTTP REST service integration tests
We found that http-test-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.