Note that there are some explanatory texts on larger screens.

plurals
  1. POWebView NavigateWithHttpRequestMessage Post is not delivered to the webserver
    primarykey
    data
    text
    <p>This is a follow-up question to the suggestion of user @Kiewic to make a post request using a webview: <a href="https://stackoverflow.com/questions/20646608/post-data-with-a-request-in-a-windows-store-app-webview-using-c-sharp">Post data with a request in a Windows Store app WebView - using C#</a></p> <p>So I am using this code</p> <pre><code>// defined before: string uri, User user HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, new Uri(uri)); request.Content = new HttpStringContent( String.Format( "language={0}&amp;session_id={1}&amp;user_id={2}", Text.GetLanguage(), user.session_id, user.user_id.ToString() ), Windows.Storage.Streams.UnicodeEncoding.Utf8, "application/x-www-form-urlencoded" ); webView.NavigateWithHttpRequestMessage(request); // webView defined in xaml </code></pre> <p>Fiddler shows me this request:</p> <pre><code>POST http://mobile.mysite.com/ HTTP/1.1 Accept: text/html, application/xhtml+xml, */* Accept-Language: en-US,en;q=0.8,de-CH;q=0.5,de;q=0.3 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; Touch; SMJB; WebView/2.0; rv:11.0) like Gecko Accept-Encoding: gzip, deflate Host: mobile.mysyte.com Content-Length: 101 Connection: Keep-Alive Pragma: no-cache Cookie: _ga=GA1.2.769009833.1387593479; PHPSESSID=nk6b04rb7d7vu4vmm2ish7l0o4 language=en&amp;session_id=fhihferihguiegierewfrefghxrfer&amp;user_id=1 </code></pre> <p>The webserver technology is PHP, so I used this code to print the post content</p> <pre><code>&lt;?php var_dump($_POST); ?&gt; </code></pre> <p>But the result is an empty array. So where is my mistake?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload