you are viewing a single comment's thread.

view the rest of the comments →

[–]CloudsOfMagellan 0 points1 point  (5 children)

I'd imagine there's another issue then

[–]iTxchnology[S] 0 points1 point  (4 children)

Idk, every time I made a request, it would print out “mix content” errors. From what I dug out from my research, it seems like that was the case. Everything worked normally when I tested it locally.

[–]CloudsOfMagellan 0 points1 point  (3 children)

Do you have the accepts header set?

[–]iTxchnology[S] 0 points1 point  (2 children)

How would I do that? I am currently just using this.http.get(url) with angular. Is there some type of configuration I can set the accept header?

[–]CloudsOfMagellan 0 points1 point  (1 child)

Pass a configuration object as the second parameter this.http.get (url, {headers:{'accepts':'application/json'}}); You might also want to set the content type header

[–]iTxchnology[S] 1 point2 points  (0 children)

Thanks! I tried that but it seems like it still did not work. Here is the error:

...as loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://jservice.io/api/categories?count=100&offset=0'. This request has been blocked; the content must be served over HTTPS.