Just wondering if anyone has had issues with cloud sending data out via a urlconnection?
I’m doing this:
Var userdata As New JSONItem
userdata.Value("software_version") = DefineEncoding(SV, Encodings.UTF8)
userdata.Value("trainer_first_name") = "James"
userdata.Value("trainer_last_name") = "Mullins"
userdata.Value("scenario_id") = 2
userdata.Compact = false
Var s As String = userdata.ToString
CaptureSocketInstance.SetRequestContent(s, "application/x-www-form-urlencoded")
CaptureSocketInstance.Send("POST", "http://testdomain.com/api/simulations")
I’m finding that on my local machine under debug it’s working fine and sending data to my website api endpoint.
If I upload to cloud then it’s failing silently.
Funny thing is that everything was working fine until the 5th of January and I can’t seem to find anything on my end. Works locally, doesn’t on the cloud. Could this be a security related error? The website that I’m trying to post to is on AWS. Is there a chance that xojocloud.net has been blacklisted?
Well for one thing, an outgoing connection wouldn’t have the domain attached to it unless you specifically added it so I don’t see any way that this could be.
Different server implementations will react differently to an incorrect/unexpected Content-Type header. Some might ignore the header, others might reject the request entirely. And which one happens can change between different versions of the same server software.
I’d love to agree, but the server is the same. The api is the same. Only difference is that I’m communicating from my pc in one instance (in debugger that works) and from within a cloud hosted environment it doesn’t.
It was working perfectly and no code changes have been made.
Something certainly changed on the API side, but the interesting thing is that the server side re-direct worked for us when testing in the debugger but didn’t work from xojocloud. Easy fix in the end but crazy to debug as it was working locally. Still not across the intricacies of why this would have worked locally but thanks for all your assistance.