From WikiChip
Editing mirc/identifiers/$urlget
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | {{mirc title|$urlget identifier}}'''$urlget''' sends a | + | {{mirc title|$urlget identifier}}'''$urlget''' sends a GET/POST to an http server. Returns an ID. |
== Synopsis == | == Synopsis == | ||
− | < | + | <pre>$urlget(url,hgpuadfbrtic,target,alias,headers,body) |
− | $urlget(url, | ||
− | |||
$urlget(N/ID)[.prop] | $urlget(N/ID)[.prop] | ||
− | </ | + | </pre> |
== Parameters == | == Parameters == | ||
− | * '''url''' - the url to access, must be prefixed with http:// or https:// | + | * '''url''' - the url to access, must be prefixed with http:// or https:// |
− | * ''' | + | * '''hgpuadfbrtic''' - switches to indicate how to proceed: |
** '''hgpuad''' - '''h''' for HEAD, '''g''' for GET, '''p''' for POST, '''u''' for PUT, '''a''' for PATCH, '''d''' for DELETE | ** '''hgpuad''' - '''h''' for HEAD, '''g''' for GET, '''p''' for POST, '''u''' for PUT, '''a''' for PATCH, '''d''' for DELETE | ||
** '''fb''' - '''f''' to output the answer (without the responses headers) to a file, '''b''' to ouput to a binvar | ** '''fb''' - '''f''' to output the answer (without the responses headers) to a file, '''b''' to ouput to a binvar | ||
− | ** '''r''' - resumes the processing | + | ** '''r'''' - resumes the processing |
** '''t''' - uses .part file if necessary | ** '''t''' - uses .part file if necessary | ||
** '''i''' - ignores SSL errors | ** '''i''' - ignores SSL errors | ||
** '''c''' - cancel the processing | ** '''c''' - cancel the processing | ||
− | |||
− | |||
* '''target''' - the output: the filename if you used '''f''', or a &binvar for '''b''' | * '''target''' - the output: the filename if you used '''f''', or a &binvar for '''b''' | ||
* '''alias''' - the name of the alias that is called at the end, this alias is called as a command with one parameter passed to it: the ID | * '''alias''' - the name of the alias that is called at the end, this alias is called as a command with one parameter passed to it: the ID | ||
Line 43: | Line 39: | ||
== Example == | == Example == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Type /urlget.test | Type /urlget.test | ||
Line 181: | Line 157: | ||
sockwrite -n %sockname Content-Length: $len(%data) | sockwrite -n %sockname Content-Length: $len(%data) | ||
sockwrite -n %sockname $+($crlf,%data) | sockwrite -n %sockname $+($crlf,%data) | ||
− | } | + | }</source> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </source> | ||
== Compatibility == | == Compatibility == |