I'm trying to use Nanodeath's HTTP_Request class, but I'm getting this error:
PostHandler cannot be resolved to a type
on this line
- Code: Select all
request.setHandler(new PostHandler(){
Any ideas why? It's finding HTTP_Request okay.
Thanks,
Tom
request.setHandler(new PostHandler(){
Set keys = variables.keySet();for(Iterator i = keys.iterator(); i.hasNext();){



void run(String response) {
Log.d("HTTP_Request", "RESPONSE: " + response);
}
@Override
void error(String error) {
Log.e("HTTP_Request", "ERROR: " + error);
}
@Override
void status(String status) {
Log.i("HTTP_Request", "STATUS:" + status);
}
public void run(String response) {
Log.d("HTTP_Request", "RESPONSE: " + response);
}
@Override
public void error(String error) {
Log.e("HTTP_Request", "ERROR: " + error);
}
@Override
public void status(String status) {
Log.i("HTTP_Request", "STATUS:" + status);
}


public void headers(Iterator arg0) { } 
ramgraph1 wrote:Using the original code by plusminus above and changing the php file's URL to my own php file's, the app runs in the emulator but I am only getting this in the warning dialog:
Data loaded:
POSTed data:''
It seems like it is working halfway as it is getting the "POSTed data:" part from the php file but for some reason is not getting the message I was trying to send. Right?
<?php
echo "POSTed data: '".$_POST['data']."'";
?> <?php
echo "POSTed data: '".$_POST['mydata']."'";
?> I am getting a warning on this line of code:
- Code: Select all
public void headers(Iterator arg0) { }
with Eclipse saying I should "rename in file"...
Any ideas what I am doing wrong? The php file is exactly the same as the one used by plusminus above.
Thanks for any help you can give.


Users browsing this forum: No registered users and 6 guests