{"action":"created","issue":{"url":"https://api.github.com/repos/allegro/allegro-api/issues/499","repository_url":"https://api.github.com/repos/allegro/allegro-api","labels_url":"https://api.github.com/repos/allegro/allegro-api/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/allegro/allegro-api/issues/499/comments","events_url":"https://api.github.com/repos/allegro/allegro-api/issues/499/events","html_url":"https://github.com/allegro/allegro-api/issues/499","id":351159565,"node_id":"MDU6SXNzdWUzNTExNTk1NjU=","number":499,"title":"Próba połączenia się z REST Api a komunikat No 'Access-Control-Allow-Origin' header is present","user":{"login":"konradmm","id":2106253,"node_id":"MDQ6VXNlcjIxMDYyNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/2106253?v=4","gravatar_id":"","url":"https://api.github.com/users/konradmm","html_url":"https://github.com/konradmm","followers_url":"https://api.github.com/users/konradmm/followers","following_url":"https://api.github.com/users/konradmm/following{/other_user}","gists_url":"https://api.github.com/users/konradmm/gists{/gist_id}","starred_url":"https://api.github.com/users/konradmm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/konradmm/subscriptions","organizations_url":"https://api.github.com/users/konradmm/orgs","repos_url":"https://api.github.com/users/konradmm/repos","events_url":"https://api.github.com/users/konradmm/events{/privacy}","received_events_url":"https://api.github.com/users/konradmm/received_events","type":"User","site_admin":false},"labels":[{"id":836122340,"node_id":"MDU6TGFiZWw4MzYxMjIzNDA=","url":"https://api.github.com/repos/allegro/allegro-api/labels/rest%20api","name":"rest api","color":"bfbfbf","default":false}],"state":"open","locked":false,"assignee":{"login":"KrzysztofLukanowski","id":36259531,"node_id":"MDQ6VXNlcjM2MjU5NTMx","avatar_url":"https://avatars3.githubusercontent.com/u/36259531?v=4","gravatar_id":"","url":"https://api.github.com/users/KrzysztofLukanowski","html_url":"https://github.com/KrzysztofLukanowski","followers_url":"https://api.github.com/users/KrzysztofLukanowski/followers","following_url":"https://api.github.com/users/KrzysztofLukanowski/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofLukanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofLukanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofLukanowski/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofLukanowski/orgs","repos_url":"https://api.github.com/users/KrzysztofLukanowski/repos","events_url":"https://api.github.com/users/KrzysztofLukanowski/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofLukanowski/received_events","type":"User","site_admin":false},"assignees":[{"login":"KrzysztofLukanowski","id":36259531,"node_id":"MDQ6VXNlcjM2MjU5NTMx","avatar_url":"https://avatars3.githubusercontent.com/u/36259531?v=4","gravatar_id":"","url":"https://api.github.com/users/KrzysztofLukanowski","html_url":"https://github.com/KrzysztofLukanowski","followers_url":"https://api.github.com/users/KrzysztofLukanowski/followers","following_url":"https://api.github.com/users/KrzysztofLukanowski/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofLukanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofLukanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofLukanowski/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofLukanowski/orgs","repos_url":"https://api.github.com/users/KrzysztofLukanowski/repos","events_url":"https://api.github.com/users/KrzysztofLukanowski/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofLukanowski/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-08-16T11:11:40Z","updated_at":"2018-08-16T12:47:36Z","closed_at":null,"author_association":"NONE","body":"Witam.\r\nNa wstępie mogę dodać, że to jedna z moich pierwszych prób łączenia się z REST Api, i pewnie to jakies glupstewko, jednak po 2h w necie, nadal nie znam rozwiazania mojego problemu.\r\n\r\n`\r\nvar request = new XMLHttpRequest();\r\n\r\nrequest.open('GET', 'https://api.allegro.pl/offers/listing?seller.id=5416', true);\r\nrequest.setRequestHeader(\"Accept\", \"application/vnd.allegro.public.v1+json\");\r\nrequest.setRequestHeader(\"content-type\", \"application/vnd.allegro.public.v1+json\");\r\nrequest.setRequestHeader(\"Authorization\", \"Bearer 495...a75\"); //z przyczyn oczywistych usunalem czesc tokenu\r\nrequest.onload = function () {\r\n  var data = JSON.parse(this.response);\r\n  document.getElementById(\"root\").innerHTML = data;\r\n}\r\nrequest.send();\r\n`\r\n\r\nTaki kod zwraca mi komunikat:\r\n`Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://mojadomena.pl' is therefore not allowed`\r\n\r\nTrochę się pogubiłem czego właściwie mi brakuje, jako ze mam header Accept. \r\nKorzystałem z przykładu podanego tutaj: https://developer.allegro.pl/news/2018-07-03-Listing_ofert/"},"comment":{"url":"https://api.github.com/repos/allegro/allegro-api/issues/comments/413533554","html_url":"https://github.com/allegro/allegro-api/issues/499#issuecomment-413533554","issue_url":"https://api.github.com/repos/allegro/allegro-api/issues/499","id":413533554,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzUzMzU1NA==","user":{"login":"KrzysztofLukanowski","id":36259531,"node_id":"MDQ6VXNlcjM2MjU5NTMx","avatar_url":"https://avatars3.githubusercontent.com/u/36259531?v=4","gravatar_id":"","url":"https://api.github.com/users/KrzysztofLukanowski","html_url":"https://github.com/KrzysztofLukanowski","followers_url":"https://api.github.com/users/KrzysztofLukanowski/followers","following_url":"https://api.github.com/users/KrzysztofLukanowski/following{/other_user}","gists_url":"https://api.github.com/users/KrzysztofLukanowski/gists{/gist_id}","starred_url":"https://api.github.com/users/KrzysztofLukanowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KrzysztofLukanowski/subscriptions","organizations_url":"https://api.github.com/users/KrzysztofLukanowski/orgs","repos_url":"https://api.github.com/users/KrzysztofLukanowski/repos","events_url":"https://api.github.com/users/KrzysztofLukanowski/events{/privacy}","received_events_url":"https://api.github.com/users/KrzysztofLukanowski/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T12:47:35Z","updated_at":"2018-08-16T12:47:35Z","author_association":"COLLABORATOR","body":"Autoryzacja użytkownika przebiegła prawidłowo? Jeśli tak to podeślij proszę pełną treść requesta w formacie cURL. Oczywiście wymoderuj token."}}
{"actor":{"display_login":"KrzysztofLukanowski"}}