dot42


dot42 - http POST request with parameters


I try to send POST request with parameters with this code:
var uri = new Uri("http://127.0.0.1:81/login/login");
var client = new DefaultHttpClient();
var par = new BasicHttpParams();
par.SetParameter("username", "admin")
par.SetParameter("password", "****");
var request = new HttpPost(uri);
request.SetParams(par);
var response = client.Execute(request);
But ASP.NET MVC server do not receive this parameters in action method.
Adapt to this snippet: http://www.androidsnippets.com/executing-a-http-post-request-with-httpclient
var httpclient = new DefaultHttpClient();
var nameValuePairs = new ArrayList<INameValuePair>(2);
nameValuePairs.Add(new BasicNameValuePair("username", "admin"));
nameValuePairs.Add(new BasicNameValuePair("password", "***"));
var ent = new UrlEncodedFormEntity(nameValuePairs);
httppost.SetEntity(ent);
var response = httpclient.Execute(httppost);

Related Links

Dot42 gives “object reference not set to an instance of an object” when inputting registration key
Get declared methods in interface
Referencing libraries from other solution
Emulator for Deploying and Debugging
Using native C libraries in dot42
Using SQLite with dot42
How to make a SOAP call with dot42?
How to handle “An Item with the same key has already been added” when adding .jar to dot42 project
How to unsubscribe an event with dot42
WaitOne() timeout parameter lost?
HOw do you uninstall Dot42
On every button click data is added to listview but in an unexpected manner . Data is repeated in the listview
Asynchronous SQLite sample with dot42?
dot42 - http POST request with parameters
Sharing code between a dot42 project and a mono desktop project

Categories

HOME
assembly
facebook-oauth
fuelux
string
pyqt
pascal
mstest
database-normalization
cublas
google-apps
parameters
fosrestbundle
augeas
google-schemas
categorical-data
owin
project-intu
rtf
php-5.6
speech-synthesis
nancy
linear-algebra
internationalization
git-extensions
shortest-path
ag
poedit
spring-async
cgbitmapcontext
libigl
roslyn
aggregation
perlbrew
surveymonkey
fat
fragment-backstack
underscore.js
alm
gnat-gps
browser-extension
processwire
lint
connection-pool
visa
stringtokenizer
install.packages
congestion-control
bindingnavigator
strftime
vaadin-elements
tf
remedy
opengl-4
meteor-packages
hadoop-2.7.2
xcode-server
myspace
watch-os-2
hclust
expectations
avspeechsynthesizer
omniauth-facebook
bizagi
project-organization
jparsec
libvlc
concurrentmodification
themoviedb-api
rubaxa-sortable
toolkit
wso2greg
dnssec
snoop
typeconverter
git-ftp
procedural-programming
cryptographichashfunction
variadic-templates
theos
entry-point
strawberry-perl
malformedurlexception
vsx
extjs2
kogrid
route-provider
wp7test
bjyauthorize
mkv
monotouch.dialog
koken
kqueue
procedures
event-receiver
drupal-fivestar
aspmenu
message-passing
application-verifier
opml
qtabbar
mathematical-notation
google-wave
firefox-3
java1.4
blind

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App