Could someone post some examples that access fluiddb? I am having trouble understanding how to setup basic http authentication using Livecode.
It is free both to sign up and use.
Any fluiddb examples available?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Contact:
Re: Any fluiddb examples available?
I don't have an example for using fluiddb but here is an example showing the use of basic http authentication in LiveCode. Perhaps it will help you figure out what you need to do for fluiddb.
Code: Select all
## Store current headers so they can be restored afterwards
put the httpheaders into theOrigHeaders
## Create new header
put "username" into theUser
put "password" into thePassword
put "Authorization: Basic " & base64Encode(theUser& ":" & thePassword ) & cr into theString
put "Content-Type: application/xml" & cr after theString
put "Accept: */*" after theString
## Set header
set the httpHeaders to theString
## Fetch url
put URL "http://some-url.com" into theData
## Restore headers
set the httpheaders to theOrigHeaders
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder