Using wpost$

Here you'll find the updated available
Post Reply
peridot
Posts: 46
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 7 times
Been thanked: 93 times

Using wpost$

Post by peridot »

Hi cicciocb
I would like to use this https://iotplotter.com . Its API uses Post with the api-key sent in the header, could we accommodate this?
Mike
User avatar
cicciocb
Site Admin
Posts: 2194
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 470 times
Been thanked: 1461 times
Contact:

Re: Using wpost$

Post by cicciocb »

Hi,
It should be possible to use the optional argument content_type$.
In fact this inserts some text in the header.
In your case, you could set the content at "text/html" + chr$(10) + "api-key: KEY_HERE" + chr$(10)

Look at the doc here for this optional argument
[Local Link Removed for Guests]
peridot
Posts: 46
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 7 times
Been thanked: 93 times

Re: Using wpost$

Post by peridot »

Thanks cicciocb, I had wondered if that may have been a possibility , I will try today.
peridot
Posts: 46
Joined: Mon Mar 08, 2021 4:54 am
Has thanked: 7 times
Been thanked: 93 times

Re: Using wpost$

Post by peridot »

Thanks cicciocb, I had wondered if that may have been a possibility , I will try today.
Post Reply