title: How to send POST and GET request?
body: <p>I want to send my <code>JSON</code> to a URL (<code>POST</code> and <code>GET</code>).</p>
  
  <pre><code>NSMutableDictionary *JSONDict = [[NSMutableDictionary alloc] init];
  [JSONDict setValue:"myValue" forKey:"myKey"];
  
  NSData *JSONData = [NSJSONSerialization dataWithJSONObject:self options:kNilOptions error:nil];
  </code></pre>
  
  <hr>
  
  <p>My current request code isn't working.</p>
  
  <pre><code>NSMutableURLRequest *requestData = [[NSMutableURLRequest alloc] init];
  
  [requestData setURL:[NSURL URLWithString:@"http://fake.url/"];];
  
  [requestData setHTTPMethod:@"POST"];
  [requestData setValue:postLength forHTTPHeaderField:@"Content-Length"];
  [requestData setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
  [requestData setValue:@"application/json" forHTTPHeaderField:@"Accept"];
  [requestData setHTTPBody:postData];
  </code></pre>
  
  <hr>
  
  <p>Using <code>ASIHTTPRequest</code> is <strong>not</strong> a liable answer.</p>