Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frisby - POST- Error parsing JSON + Error: DEPTH_ZERO_SELF_SIGNED_CERT #194

Closed
abcdefghigk opened this issue Feb 18, 2015 · 2 comments
Closed

Comments

@abcdefghigk
Copy link

/*************** code *******************************/
var frisby = require('frisby');
var endpoint = https://xxxxx.com/yyy';
var post_data = {
"name":"test1",
};
frisby.create('Create one domain: test1')
.post(endpoint,
post_data,
{ json: true })
.inspectJSON()
.expectStatus(200)
.toss();

/************ Error message *****************/
Error: Error parsing JSON string: Unexpected token D
Given: Destination URL may be down or URL is invalid,
Error: DEPTH_ZERO_SELF_SIGNED_CERT

/****************** More information *************/
frisby version is 0.8.5

/******************* Question/Help ****************/
Who can help me? Thanks in advance

@adrianblynch
Copy link

Have a read through this issue:

request/request#418

@abcdefghigk
Copy link
Author

Great! It works for me (process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" ). Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants