title: Passing parameter in url for GET method using afnetworking
body: <p>i have url in which query is executed.</p>
  
  <pre><code>https://&lt;BASE_URL&gt;/&lt;TENANT_URL&gt;/?query=where UserName='abc'&amp;companyId=&amp;page=1&amp;pageSize=25&amp;filterResultByColumns=true
  </code></pre>
  
  <p>i am escaping the remaining part after tenant url like this,</p>
  
  <pre><code> NSString *requestUrl = [[NSString stringWithFormat:@"%@/?query=where UserName='%@'&amp;companyId=&amp;page=1&amp;pageSize=25&amp;filterResultByColumns=true",&lt;TENANT_URL&gt;,userCredential.userName]stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
  
      requestUrl = [NSString stringWithFormat:@"%@/%@",baseurl,requestUrl];
  </code></pre>
  
  <p>Here is my GET request.</p>
  
  <pre><code>AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
          AFHTTPResponseSerializer *serializer = [AFHTTPResponseSerializer serializer];
  
              serializer.acceptableContentTypes = [NSSet setWithObject:@"application/json"];
  
  
          manager.responseSerializer = serializer;
          manager.requestSerializer = [AFJSONRequestSerializer serializer];
      NSString *path = [NSString stringWithFormat:@"%@",URL];
  
  
      [manager GET:path parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
                      NSError* error = nil;
                      NSArray* json = [NSJSONSerialization
                                            JSONObjectWithData:responseObject
  
                                            options:kNilOptions 
                                            error:&amp;error];
                      success(json);
                  }
                       failure:^(AFHTTPRequestOperation *operation, NSError *error) {
                           failure(error);
                       }];
  </code></pre>
  
  <p>But i always getting a 400 Bad request error. I think problem is with "query=where ..". But i am not sure. How can i parse the URL. I tested with "POSTMAN" in Chrome. It works perfectly. But it throws me an error when i run the app.</p>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>Error Domain=AFNetworkingErrorDomain Code=-1011 "Request failed: bad request (400)" UserInfo=0xb7ac2b0 {NSErrorFailingURLKey=https://&lt;BASE_URL&gt;/&lt;TENANT_URL&gt;/?query=where UserName='abc'&amp;companyId=&amp;page=1&amp;pageSize=25&amp;filterResultByColumns=true&amp;url=https%3A%2F%2F&lt;BASE_URL&gt;%2F%2F&lt;TENANT_URL&gt;%2F%3F?query=where%2DUserName%3D%27abc%27%26companyId%3D%26page%3D1%26pageSize%3D25%26filterResultByColumns%3Dtrue, AFNetworkingOperationFailingURLResponseErrorKey=&lt;NSHTTPURLResponse: 0xb7e6910&gt; { URL: https://&lt;BASE_URL&gt;/&lt;TENANT_URL&gt;/?query=where UserName='abc'&amp;companyId=&amp;page=1&amp;pageSize=25&amp;filterResultByColumns=true&amp;url=https%3A%2F%2F&lt;BASE_URL&gt;%2F%2F&lt;TENANT_URL&gt;%2F%3F?query=where%2DUserName%3D%27abc%27%26companyId%3D%26page%3D1%26pageSize%3D25%26filterResultByColumns%3Dtrue } { status code: 400, headers {
      "Cache-Control" = private;
      "Content-Length" = 0;
      "Content-Type" = "text/html";
      Date = "Fri, 17 Jan 2014 05:29:56 GMT";
      Server = "Microsoft-HTTPAPI/2.0";
      "X-AspNet-Version" = "4.0.30319";
      "X-Powered-By" = "ASP.NET";
  } }, NSLocalizedDescription=Request failed: bad request (400)}
  </code></pre>