title: How to pass your username and password in a get request with groovy?
body: <p>I send GET request and receive error 500</p>
  <pre><code> def baseUrl = new URL(url)
           HttpURLConnection connection = (HttpURLConnection) baseUrl.openConnection();
           connection.addRequestProperty(&quot;Authorization&quot;, &quot;user1 user1&quot;)
           connection.addRequestProperty(&quot;Accept&quot;, &quot;application/json&quot;)
           connection.with {
             doOutput = true
             requestMethod = 'GET'
             println content.text
           }
  </code></pre>
  <p>I am sure that my api work true.</p>
  <p>How to pass your username and password in a get request with groovy?</p>