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

Remote does not handle url that already has ? #133

Open
3400442579 opened this issue Jan 9, 2025 · 2 comments
Open

Remote does not handle url that already has ? #133

3400442579 opened this issue Jan 9, 2025 · 2 comments

Comments

@3400442579
Copy link

?handler=Unique?IP=192.168.1.2

请求 url 会有两个 ‘?’

@3400442579 3400442579 changed the title PageRemote PageHandler , url error PageRemote PageHandler , url error ,get Jan 9, 2025
Repository owner locked as spam and limited conversation to collaborators Jan 9, 2025
Repository owner unlocked this conversation Jan 9, 2025
@dahlbyk dahlbyk changed the title PageRemote PageHandler , url error ,get Remote does not handle url that already has ? Jan 9, 2025
@dahlbyk
Copy link
Collaborator

dahlbyk commented Jan 9, 2025

请求 url 会有两个 ‘?’

Translation: The request url will have two ‘?’

Seems legit, if url already has a ? we should use a & here to concatenate payload:

request.open('get', url + '?' + payload);

@3400442579
Copy link
Author

asp.net core razor pages

[PageRemote(ErrorMessage ="已存在", PageHandler= "AccountUnique")]
PageHandler 会自动生成 xxxxx?handler=AccountUnique

request.open('get', url + '?' + payload);

就会变成

xxxxx?handler=AccountUnique?payload

请求页面就会不存在,

如果用 [PageRemote(ErrorMessage ="已存在", PageName = "AccountUnique")] 是正常的 ,

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

2 participants