NEWBIE Questions - How do I send to Notes APP or URL

Hi,

Just getting started…

1 - How do I save to the Notes app?

2 - is it possible to send to a url? I would like to be able to send an http request as GET or POST to a url. How can i do that?

See:

For HTTP requests, see example script in scripting reference

Wow ok that looks cool - Can you help me getting any basic example set up in Drafts 5 app? Not sure where to start…

Do you have a scripting background? You might start with an example from the Action Directory that uses an HTTP request, like this Dark Sky example.

Here’s a quick example based on the example in the documentation that Greg originally referred to. It is using an open testing API.

//Initialise
let httpMain = HTTP.create();

//POST example
let response = httpMain.request(
	{
	"url": "https://reqres.in/api/users",
	"method": "POST",
	"data":
		{
			"name" : "Keanu Reeves",
			"movies" : ["Speed", "The Martrix", "John Wick"]
		}
	});

//POST result
if(response.statusCode = 201)
{
	alert("STATUS: " + response.statusCode + "\n" + response.responseText);
}
else alert("STATUS: " + response.statusCode + "\nFailed to create record");

//GET example
response = httpMain.request(
	{
		"url": "https://reqres.in/api/2",
		"method": "GET"
	});

//GET result
alert("STATUS: " + response.statusCode + "\n" + response.responseText);

ok [agiletortoise] that is cool - but darksky says no api key for me cause…

We are no longer accepting new signups.

Please see our blog post for more information.

Thanks - I will try to get this going…

and yes I do have some background with programming - just not sure how to get started in drafts

When i tried to go edit the dark sky from import - just to look around - it wouldn’t let me with a free account right?

it seems that I will need a paid account to set this up?

You need a pro subscription for action editing/creation.

There should be a free 7-day trial on the annual subscription.

Great - thanks for the info!