HomeForumSourceResearchGuide
Sign in to contribute to source. how it works
Type definition file net.http.HTTPRequest by barry
expand copy to clipboardexpand
/*
 {"description" : "Make a HTTP request."}
*/
uses Header

interface HTTPRequest {
	/*
	 {"@description" : "Make a HTTP GET request, returning a response structure."}
	*/
	HTTPResponse get(char url[], opt Header headers[], bool secure)
	
	/*
	 {"@description" : "Make a HTTP POST request, returning a response structure."}
	*/
	HTTPResponse post(char url[], Header headers[], char postData[], opt bool secure)
}

data HTTPResponse {
	char url[]
	char responseCode[]
	char responseMessage[]
	byte content[]
	char contentType[]
	Header headers[]
}
Revision history
To propose a new revision to this entity, use dana source put -ut your/new/version.dn -n net.http.HTTPRequest -m "reason for update" -u yourUsername
Version 2 by barry
Version 1 (this version) by barry
Notes for this version: Standard Library Initialisation