New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

httpproblem

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

httpproblem - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

2

package.json
{
"name": "httpproblem",
"version": "0.5.2",
"version": "0.5.3",
"description": "Create Problem Details for HTTP APIs according to RFC 7807",

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

@@ -8,5 +8,11 @@ # Create problem+json documents with Node.js

```
npm install --save-dev httpproblem
npm install --save httpproblem
```
or
```
yarn add httpproblem
```
## Usage

@@ -81,2 +87,21 @@

### StatusCodeProblems
`httpproblem` also provides some default problems for HTTP Status Codes you can just create without providing further details.
The supported `StatusCodeProblems` you can create, are:
- BadRequestProblem
- UnauthorizedProblem
- ForbiddenProblem,
- NotFoundProblem,
- InternalServerErrorProblem
Instances can be created like this:
```js
const httpProblem = require('httpproblem');
const UnauthorizedProblem new httpProblem.StatusCodeProblems.UnauthorizedProblem();
```
## Running the tests

@@ -104,3 +129,3 @@

Copyright (c) 2017 PDMLab
Copyright (c) 2017 - 2019 PDMLab

@@ -107,0 +132,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc