SQL access to an XL device using HTTP Post vb.net -


i working on project supposed pull data xl device central location. emailed company , said need make http post request , parse returned json. additionally said should make post request in format.

post /sql-request.do http/1.0 content-length: 141 response_type=application/json&sql_statement=select sequence_number,  start_time timeline_stream order sequence_number desc limit 5; 

i have put believe code vb.net, , response server. not requested table information. here code using.

private sub webrequester()      dim response httpwebresponse = nothing     dim replystreamreader streamreader = nothing     dim request httpwebrequest = httpwebrequest.createhttp("http://192.168.100.223/data/schema/expanded?response_type=application%2fjson&sql_statement=select%20*%20from%20intervals")     dim postdata string = "test"     dim data() byte = utf8encoding.utf8.getbytes(postdata)      request.contenttype = "application/x-www-form-urlencoded"     request.credentials = new networkcredential("user", "pass")     request.contentlength = data.length     request.method = "post"     using requeststream stream = request.getrequeststream         requeststream.write(data, 0, data.length)     end using      response = request.getresponse()     replystreamreader = new streamreader(response.getresponsestream)     dim responsefromserver string = replystreamreader.readtoend()     console.writeline(responsefromserver) end sub 

i have tried using query string postdata, still returns seems default response. 78 pages when put in word, here first line of response getting.

<?xml version="1.0"?><data_schema><registers><table name="extended_user_strings" number="8" min_rows="1" max_rows="1" defined_by="system" display_name="extended_user_strings_literal" help_text="table_extended_user_strings_copy"><column name="string_1" number="1" index="no" display_name="extended_user_string_1_literal" help_text="extended_user_string_copy" type="string" access="read_write"><restrictions><max_length value="1024" /><pattern value="^[\x20-\xfe]*$" /></restrictions></column><column name="string_10" number="10" index="no" display_name="extended_user_string_10_literal" help_text="extended_user_string_copy" type="string" access="read_write"><restrictions><max_length value="1024" 

how can query device , table i'm looking for?


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -