Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

response body is no content, but if in real browser return json/string #534

Closed
toshim45 opened this issue Aug 15, 2014 · 4 comments
Closed

Comments

@toshim45
Copy link

please help, if i open my apps from real browser will return this
screen shot 2014-08-16 at 5 59 10 am
but if I open it from "try it out" return this
screen shot 2014-08-16 at 5 58 53 am
I only change index.html

/* url: "http://petstore.swagger.wordnik.com/api/api-docs", */ 
url: "http://localhost:8080/pena-im/api-docs",

Am I missing some configuration ?
by the way I'm just using dist folder, not building from source

Thanks in advance

@fehguy
Copy link
Contributor

fehguy commented Aug 16, 2014

Are you opening the swagger-ui from the filesystem? This is most likely a cors issue:

https://github.com/wordnik/swagger-core/wiki/CORS

@toshim45
Copy link
Author

yes you're right @fehguy thanks a lot. issue solved. pls close this :)

@fehguy
Copy link
Contributor

fehguy commented Aug 16, 2014

Great

@fehguy fehguy closed this as completed Aug 16, 2014
@bijayy33
Copy link

If you are using .NET Core. Using this in startup.cs file

services
.AddMvc()
.AddJsonOptions(x => x.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants