im using var tokenRequest = <https.post>({ url: "<...
# ask-stanley-ai
n
im using var tokenRequest = https.post({ url: "test.com", headers: header, body: BodyString, }); but the endpoint is receiving as get and not post how is that?
c
AI generated answer (using internal Slack threads):
Based on the conversations provided, it seems like the issue you're encountering is due to the incorrect property name in your request object. In your request, you're using
header
instead of
headers
. The correct property name should be
headers
. Here's how your corrected code should look like:
Copy code
javascript
var tokenRequest = <http://https.post|https.post>({
    url: "<http://test.com>",
    headers: header,
    body: BodyString,
});
Please ensure that you're using the correct HTTP method (
POST
in this case) and that the endpoint you're trying to reach supports this method. If the endpoint is still receiving a
GET
request instead of
POST
, it might be an issue with the endpoint configuration, not with your request. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.847777426
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.845284581
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.841163516
Please provide your feedback on this answer.