Fandom

Livecode Wiki

Liburlsetexpect100

Redirected from LibURLSetExpect100

2,161pages on
this wiki
Add New Page
Comments0 Share

Impose a bytes limit to perform auto controls on POST transactions.

Syntax:

libURLSetExpect100 limit

limit is a number of bytes.

When called, subsequent POST requests will add an "Expect: 100-continue" field to the http headers when the data to be posted exceeds the limit. The data won't be written to the socket until a 100 Continue response is received from the server.

This can be useful when posting large amounts of data and where there is a risk of the POST failing (because of failed authentication, or whatever). For example, if authentication is required, the data won't be written until after the authentication has cleared.

The libURLSetExpect100 command is part of the Internet library. To ensure that the keyword works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions section of the Standalone Application Settings window, make sure "Internet Library" is selected in the list of script libraries.

When included in a standalone application, the Internet library is implemented as a hidden group and made available when the group receives its first openBackground message. During the first part of the application's startup process, before this message is sent, the http keyword is not yet available. This may affect attempts to use this keyword in startup, preOpenStack, openStack, or preOpenCard handlers in the main stack. Once the application has finished starting up, the library is available and the http keyword can be used in any handler.

See Also: post Command, libURLMultipartFormData Function, libURLFormData Function

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.