title: invalid character 'R' looking for beginning of value
body: <p>I am trying to hit a url</p>
  <pre><code>http://localhost:33250/api/v1/edit-order-request/?order_id=1231
  </code></pre>
  <p>, there I get this error :</p>
  <pre><code>invalid character 'R' looking for beginning of value
  </code></pre>
  <p>What am I doing wrong?</p>
  <p>Edit :
  http_client.go</p>
  <pre><code>func (c *HTTPClient) Call(url string, body interface{}, h http.Header, hc string, method string) (*response.BaseResponse, error) {
      outputChannel := make(chan *response.BaseResponse, 1)
      util.FilterHeaders(&amp;h)
      errChannel := hystrix.Go(hc, func() error {
          var res *http.Response
          var err error
          switch method {
  
          case util.Post:
              rbyte, _ := json.Marshal(body)
              rreader := bytes.NewReader(rbyte)
              res, err = c.httpClient.Post(url, rreader, h)
          case util.Put:
              rbyte, _ := json.Marshal(body)
              rreader := bytes.NewReader(rbyte)
              res, err = c.httpClient.Put(url, rreader, h)
          case util.Patch:
              rbyte, _ := json.Marshal(body)
              rreader := bytes.NewReader(rbyte)
              res, err = c.httpClient.Patch(url, rreader, h)
          case util.Get:
              res, err = c.httpClient.Get(url, h)
              log.Info().Msgf(&quot;res %v&quot;,res)
          }
          if err != nil {
              log.Error().Err(err).Msgf(method+&quot; api failed: %s&quot;, body)
              return err
          }
          defer res.Body.Close()
          var baseResponse response.BaseResponse
          d := json.NewDecoder(res.Body)
          d.UseNumber()
          err = d.Decode(&amp;baseResponse)
          if err != nil {
              log.Error().Err(err).Msgf(&quot;Failed to decode the response for url %s&quot;, url)
              return err
          }
          baseResponse.HTTPStatusCode = res.StatusCode
  
          outputChannel &lt;- &amp;baseResponse
          return nil
      }, func(err error) error {
          return err
      })
      select {
      case res := &lt;-outputChannel:
          log.Info().Msgf(method+&quot; response for URL %s, BODY %s , HEADER %s, RESPONSE %s&quot;, url, util.ToJSON(body), util.ToJSON(h), util.ToJSON(res))
          return res, nil
      case err := &lt;-errChannel:
          log.Info().Msgf(&quot;Error received on error channel for URL %s&quot;, url)
          return nil, err
      }
  }
  </code></pre>
  <p>Stub :</p>
  <pre><code>var EditServiceGetConversationIdOmtTaskIdNonEmptyStub = &amp;wiremock.Stub{
      Request: wiremock.Request{
          Method:     &quot;GET&quot;,
          UrlPattern: &quot;/api/v1/edit-order-request/&quot;+&quot;?order_id=1231&quot;,
      },
      Response: wiremock.Response{
          Status: 200,
          Body:   EditServiceGetConversationIdOmtTaskIdNonEmptyResponse,
      },
  }
  
  var EditServiceGetConversationIdOmtTaskIdNonEmptyResponse = &quot;{\&quot;statusCode\&quot;:0,\&quot;statusMessage\&quot;:\&quot;success\&quot;,\&quot;data\&quot;:{\&quot;order_id\&quot;:1231,\&quot;edit_reason\&quot;:\&quot;EDIT\&quot;,\&quot;crm_conversation_id\&quot;:\&quot;p-qwr-1234\&quot;,\&quot;omt_task_id\&quot;:\&quot;1231\&quot;}}&quot;
  </code></pre>
  <p>When in stub I use Url parameter , then this error is gone. Could someone explain me the reason for this  ?</p>
  <p>Error Logs when using Url Pattern as parameter :</p>
  <pre><code>http_client.go:54 &gt; res &amp;{404 Not Found 404 HTTP/1.1 1 1 map[Content-Type:[text/plain] Server:[Jetty(9.4.20.v20190813)]] 0xc001fd5200 -1 [] true false map[] 0xc0003e6100 &lt;nil&gt;}
  http_client.go:66 &gt; Failed to decode the response for url http://localhost:33350/api/v1/edit-order-request/?order_id=1231 error=&quot;invalid character 'R' looking for beginning of value&quot;
  http_client.go:81 &gt; Error received on error channel for URL http://localhost:33350/api/v1/edit-order-request/?order_id=1231
  </code></pre>
  <p>Success Logs in case of Url as Parameter :</p>
  <pre><code>http_client.go:54 &gt; res &amp;{200 OK 200 HTTP/1.1 1 1 map[Matched-Stub-Id:[901cbfb1-fc1a-40e8-9f00-fae29f54be3d] Server:[Jetty(9.4.20.v20190813)] Vary:[Accept-Encoding, User-Agent]] 0xc0020aa8a0 -1 [] true true map[] 0xc0020a0600 &lt;nil&gt;}
  http_client.go:78 &gt; GET response for URL http://localhost:33355/api/v1/edit-order-request/?order_id=1231, BODY null , HEADER {&quot;Authorization&quot;:[&quot;Basic R0dZU1dJOjIwMTVTVyFHR1k=&quot;],&quot;Content-Type&quot;:[&quot;application/json&quot;]}, RESPONSE {&quot;statusCode&quot;:0,&quot;statusMessage&quot;:&quot;success&quot;,&quot;data&quot;:{&quot;crm_conversation_id&quot;:&quot;p-qwr-1234&quot;,&quot;edit_reason&quot;:&quot;EDIT&quot;,&quot;omt_task_id&quot;:&quot;1231&quot;,&quot;order_id&quot;:1231},&quot;httpStatusCode&quot;:200,&quot;id&quot;:0,&quot;code&quot;:&quot;&quot;,&quot;message&quot;:&quot;&quot;}
  </code></pre>