Any fluiddb examples available?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
jmarques
Posts: 1
Joined: Sat Jan 29, 2011 4:22 pm

Any fluiddb examples available?

Post by jmarques » Sat Jan 29, 2011 4:29 pm

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.

trevordevore
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1005
Joined: Sat Apr 08, 2006 3:06 pm
Contact:

Re: Any fluiddb examples available?

Post by trevordevore » Thu Feb 03, 2011 2:57 pm

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

Post Reply