Black Box Version 1.0 Uživatelský manuál Strana 38

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 42
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 37
Copyright © 2009, 2010 Black Box Network Services
724-746-5500 | blackbox.com 38
iCOMPEL Digital Signage (V8.1.0)
4.2.4 HTTP POST Request
Function
Allow HTML pages played in iCOMPEL to submit web forms and post data to URI using HTTP POST method.
This will enable the HTML player to play web pages that require HTML form based login. A custom HTML page can be built
to HTTP Get the new page, submit a login form, setup a session and display content that otherwise would not have been
possible.
This API uses XML Services proxy, if configured.
Syntax
The following XML shall be posted to '/XML' with 'Content-type' set to 'text/xml':
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<http_request href="http://www.onelan.co.uk"
username="fakeuser"
password="fakepassword"
method="post">
<header name='language' value='en-GB' />
<content content_type="x-www-form-urlencoded">&amp;query_id=2</content>
</http_request>
Return Status
HTTP Status code and content as returned by remote server on success, 500 otherwise.
Compatibility
Introduced in 8.0.
4.3 Sample Code
Below is sample C# code which will Post an Advance To message.
using System;
using System.Text;
using System.Net;
using System.IO;
using System.Xml;
using System.Security;
namespace TestNTBPost
{
class NTBPost
{
static public void postAdvanceTo(string rendezvous_name, string hostname, string username, string password)
{
try
{
Console.WriteLine( string.Format(
"Info: Post advance to: {0} to NTB: {1}",
rendezvous_name, hostname));
string advance_to_message = string.Format(
Zobrazit stránku 37
1 2 ... 33 34 35 36 37 38 39 40 41 42

Komentáře k této Příručce

Žádné komentáře