question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error in $http.post

See original GitHub issue

Hi,

i just find issue No ‘Access-Control-Allow-Origin’ header is present on the requested resource. my code no headers in this.$http.post

but i added headers like this

{
  headers: {
    // 'Access-Control-Allow-Origin': true,
    emulateJSON: true,
    emulateHTTP: true
  }
}

i got error like this (in promise) TypeError: str.replace is not a function how can i fixed this? thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
Meekohicommented, Mar 19, 2018

@elviskudo emulateJSON is an option you can pass to vueresource, not part of the headers:

{
  headers: {
    // 'Access-Control-Allow-Origin': true 
  },
  emulateJSON: true,
  emulateHTTP: true
}
0reactions
elviskudocommented, Aug 15, 2018

thanks @Meekohi my project solved

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error with HTTP post request - java - Stack Overflow
1 Answer 1 · 1.Client data cannot be appended to URL if it is POST request. It can be done only if it...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
Client error responses · 400 Bad Request · 401 Unauthorized · 403 Forbidden · 404 Not Found · 405 Method Not Allowed ·...
Read more >
"Remotely Closed" Error for HTTP Post Request if Streaming ...
HTTP Connector Post Request detects "Remotely Closed" error if the Target API has a short timeout and the HTTP Post Request is not...
Read more >
Internal Server Error for a HTTP POST request [closed]
I am having a script activity that Posts an HTTP request. The issue is that sometimes, the request returns internal error(500).
Read more >
HTTP POST request failed due to IO error - Search - Informatica
This issue occurs when there is connectivity issue between agent server and informatica server especially if there is proxy configured on the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found