How to send a GET request with a “/” in the query

只愿长相守 提交于 2019-12-06 08:12:23

For REST APIs, JSON objects are typically sent (POST) or returned in the body of the request. They are not typically encoded as part of the URL.

For a GET request, you can either pass the information as segments in the url or as querystring parameters.

As segments in the url:

/resourcetype/{path}/{filename}
http://testserver:8080/resourcetype/test/2/2/test.jpg

As querystring params:

/resourcetype?path={path}&file={filename}
http://testserver:8080/resourcetype?path=test/2/2&filename=test.jpg
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!