Hello all.
there is a api which is given to me for integration in my application. but i dont know what strtegy they has been followed when this made. only url and headers are given to me.
when i integrate in my MVC project i have issue of Cross-Origin detail are in snapshot, i googled alot of time and as every one folllowed the strategy i modified my code but result is same. so please any one help me to fix this issue
code is below
- <script>
- $(document).ready(function () {
- $('#btnLoad').click(function () {
-
- $.ajax({
- url: url,
- headers: {
- 'Access-Control-Allow-Origin': '*',
- "Authorization": "Bearer + token"
- },
- success: function (response) {
- $.toaster({ priority: "success", title: "Congrat!", message: "Data loading...." });
- console.log(response);
- },
- error: function () {
- $.toaster({ priority: "danger", title: "oooppss!", message: "failed" });
- }
-
- });
-
- })
-
- })
-
- script>
Error snpashot is attached
thanksin advance
more over when this api check by postman it fine.