Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is Not The Right Way To Hit The URL You Are Passing its Parameter to its url Just to to write Bytes to output Stream and then request the url</p> <pre><code> URL googlePlaces = new URL("https://maps.googleapis.com/maps/api/place/textsearch/json?query=Cloud&amp;types=food&amp;language=en&amp;sensor=true&amp;location=33.721314,73.053498&amp;radius=10000&amp;key=&lt;Key&gt;"); </code></pre> <p>This is the Rigth Way to Hit The Url.</p> <pre><code> url=new URL("https://maps.googleapis.com/maps/api/place/textsearch/json"); </code></pre> <p>and then put all the parameters to the params Map;</p> <pre><code> Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;(); params.put("query","Cloud"); params.put("types", "foods");....like this put all </code></pre> <p>and then Build The Body..</p> <pre><code> StringBuilder bodyBuilder = new StringBuilder(); Iterator&lt;Entry&lt;String, String&gt;&gt; iterator = params.entrySet().iterator(); // constructs the POST body using the parameters while (iterator.hasNext()) { Entry&lt;String, String&gt; param = iterator.next(); bodyBuilder.append(param.getKey()).append('=') .append(param.getValue()); if (iterator.hasNext()) { bodyBuilder.append('&amp;'); } } String body = bodyBuilder.toString(); </code></pre> <p>Hear Body Contains All The Parameters Which You Cant Directly Request..by the Url..but You Written it to the OutputStream...and then make a request..and wright the bytes</p> <pre><code> byte[] bytes = body.getBytes(); OutputStream out = conn.getOutputStream(); out.write(bytes); out.close(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload