HttpHostSet

Family: HTTP · 2 forms

What it does

HttpHostSet sets Host on a HTTP object. It takes connectionID (an integer), host (a string) and secure (an integer), and answers an integer. That is the first of 2 forms. connectionID is the id of a Connection object, obtained elsewhere in the HTTP family.

Syntax

1
HttpHostSet(connectionID integer, host string, secure integer) → integer
2
HttpHostSet(connectionID integer, host string, secure integer, user string, password string) → integer

Parameters

NameTypeIn forms
connectionIDintegerall
hoststringall
secureintegerall
userstring2
passwordstring2

Every form returns

integer

Example · generated

Form 1, the short one

connection = CreateHttpConnection()DO  Print(HttpHostSet(connection, "value", 1))  Sync()LOOP

Form 2, with every argument

connection = CreateHttpConnection()DO  Print(HttpHostSet(connection, "value", 1, "value", "value"))  Sync()LOOP

CreateHttpConnection is there to give the call something to act on; HttpHostSet is the line that matters. The DO … LOOP is not decoration: a classic BASIC program ends the moment it runs out of lines, and Sync() is what draws the frame.

21 commands in HTTP