--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
401 (Unauthorized)...
(index):1 XMLHttpRequest cannot load http://.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '...' is therefore not allowed access. The response had HTTP status code 401.
My guess is that the problem is actually with the response from the server.Can you check the result of the request in your browser's web console network tab when you click the try-it-out?
On Thu, Oct 8, 2015 at 9:49 PM, Tom Johnson <tomjohn...@gmail.com> wrote:
In my Swagger-UI project, when I click Try-it-out, I get an error that says "No response from server." It has response code 0. And there's nothing in the response body.However, the auto-generated cURL code that appears after clicking Try-it-out does actually work. When I paste that into Terminal, I get the right response.I'm wondering if my API supports Swagger. The authentication requires an HMAC signature in the header, which I think is working. But maybe other kinds of requests are blocked? How do I know if my API is compatible with Swagger?(Sorry I can't post my code since it's behind the firewall.)
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm getting a CORS error in the console when clicking Try it out:
401 (Unauthorized)...
(index):1 XMLHttpRequest cannot load http://.... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '...' is therefore not allowed access. The response had HTTP status code 401.Why can I execute calls fine from Postman or cURL without worrying about CORS, but not from Swagger UI on a web server? I'm submitting an HMAC signature in the header with both approaches.Tom
On Thursday, October 8, 2015 at 10:44:27 PM UTC-7, Ron wrote:
My guess is that the problem is actually with the response from the server.Can you check the result of the request in your browser's web console network tab when you click the try-it-out?
On Thu, Oct 8, 2015 at 9:49 PM, Tom Johnson <tomjohn...@gmail.com> wrote:
In my Swagger-UI project, when I click Try-it-out, I get an error that says "No response from server." It has response code 0. And there's nothing in the response body.However, the auto-generated cURL code that appears after clicking Try-it-out does actually work. When I paste that into Terminal, I get the right response.I'm wondering if my API supports Swagger. The authentication requires an HMAC signature in the header, which I think is working. But maybe other kinds of requests are blocked? How do I know if my API is compatible with Swagger?(Sorry I can't post my code since it's behind the firewall.)
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-------------------------------------------http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
I confirmed with my dev team that CORS isn't enabled on our API. (I don't understand why Postman works but Swagger or JS on a page doesn't work, but oh well.) I hope I can get things changed, but if not I'm out of luck.
--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.