You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kataras
changed the title
[BUG] post request return 200 ok by postman, no data, but js code request is ok , has data, why ?
[QUESTION] post request return 200 ok by postman, no data, but js code request is ok , has data, why ?
Apr 24, 2024
Hello @jiulu313, so with javascript code you get body but with postman you don't. I need more information about your handler, did you try to manually add it using a simple func(ctx iris.Context) { ... } instead of the GetAllTag? What's the contents of the tiger.NewTagService(c.Ctx).GetAllTag()? I am marking this as question because the framework has nothing to do between js code or postman to retrieve data from the server.
Describe the bug
post request return 200 ok by postman, no data, but js code request is ok , has data, why ?
my version:
github.com/kataras/iris/v12 v12.2.5
github.com/iris-contrib/middleware/cors v0.0.0-20220921193907-d3e7dfb17c8f
go: 1.21
there are my some code and img
![image](https://private-user-images.githubusercontent.com/4046526/324183903-9c045f0c-4bec-4f4b-a8d1-fe22942d4d6d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUwNjY0ODgsIm5iZiI6MTcyNTA2NjE4OCwicGF0aCI6Ii80MDQ2NTI2LzMyNDE4MzkwMy05YzA0NWYwYy00YmVjLTRmNGItYThkMS1mZTIyOTQyZDRkNmQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgzMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MzFUMDEwMzA4WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ODI0MTFmZTQyOWJhNmFhMjViODQzZWQ3N2U2MzM5Yjg5MDA0OGQxZTc0OTZlMGY1OGEzYzg1MjFkNDZjZWIzZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.-ENtlKkiD1Sn0f9RzDZuSmHEzfsZUE0bc5VHaKryh-g)
if I change the method post as get and use postman, it is ok , has body json data
but the method is post, it is ok, no data.
please help me , thank you!
The text was updated successfully, but these errors were encountered: