Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • When I do: var_dump(json_decode($postdata)); it returns NULL Commented Oct 5, 2012 at 11:26
  • Nope is displays nothing :( But i've also tried other ways to send a request with post parameters without json and also won't work. Commented Oct 5, 2012 at 11:34
  • like post.setEntity(new StringEntity("key1=value1", "UTF-8")); ? Commented Oct 5, 2012 at 11:39
  • in that case you should probably change content type to application/x-www-form-urlencoded Commented Oct 5, 2012 at 11:40
  • Tried the other way you said and changed the content type but the $_POST is an empty array and the $postdata (php://input) is empty. Commented Oct 5, 2012 at 11:55