Sending a value parameter through

Trying the following code segment in the weather example:

local req =“”,
{ “Content-Type”:“application/x-www-form-urlencoded” }, “”)
req.sendasync(function(response) {
device.send(“success”, response.statuscode);

I get a statuscode of 200 which I assume everything is ok but the value of never gets sent. I have also tried putting where the value parameter goes, the “” in my example, but nothing happens.
Any ideas?

Another weird thing is that even if you put a bogus URL you still get a status 200. Why?

I think sunmsg=" needs to go in the body not in the url as query string. I’m posting like that and it works.
local req =" { "Content-Type":"application/x-www-form-urlencoded" }, "sunmsg="
Also for this type of testing I find helps see what your outputing

Thanks. I keep getting an error “newline in a constant” on the first line. If I put a quote and a comma after the .php no error but nothing gets sent. Any ideas?

What event/where are you trying to send it from?

Near the end of the getconditions function in the weather example, right after device.send(“new data”,forecasting);

Got it to work added a " after php.