Is it possible to transfer the json format in the address bar of the browser url? (GET method)

I want to test my url service in a browser, but you need to transfer json format data.

I tried below, but did not succeed: http: // locahost: 8042 / service / getinfo? Body = {"name": "H & M"}

or any tool that can be used to transfer test data in json format?

UPDATES1 I mean to transfer data in json format manually in the address bar of the browser URL. Like in my example above. This is for quick testing just not for implementation.

+6
source share
4 answers

Yes, you can certainly pass JSON to a Querystring URL. You just need the JSON string url first. As @dmn said, data is probably better transmitted through POST due to GET size limits.

+2
source

The {and} characters are considered unsafe for use without the use of a URL.

http://www.faqs.org/rfcs/rfc1738.html

+1
source

It would probably not be a good idea to include it in GET, as url parameters have a limit of 256 characters. It would be better if you used POST and put JSON in the body, and after that you can parse it with Jackson, for example, gson ... and get the result as an object.

0
source

Yes, you can add an extension to the chrome web browser called "Advance rest Client" and change the title in application / json and make a json object and publish it in a paid load, and then click "Give from the bottom" for the json object

0
source

Source: https://habr.com/ru/post/901181/


All Articles