This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| scripting:restapi [2022/10/03 16:43] – jotasandoku | scripting:restapi [2023/11/02 14:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | * [[https:// | + | __REST API (OR REST-API)__ |
| - | + | ||
| - | ---- | + | |
| - | + | ||
| - | + | ||
| - | **CURL** | + | |
| - | \\ | + | |
| - | **TODO: curl most common flags** | + | |
| \\ | \\ | ||
| - | **CRAFTED REQUESTS**\\ | ||
| - | The USER-AGENT makes a request in which they connect to the DOMAIN | ||
| - | |||
| - | GET / | ||
| - | |||
| - | So normally hostname and request comes in DIFFERENT PACKETS. The DOMAIN is not traveling in any packet, that's resolved into an IP. | ||
| - | |||
| - | The entire URL, e.g.: " | ||
| - | |||
| - | |||
| - | METHOD path HTTP/ | ||
| - | Host: hostname | ||
| - | |||
| - | E.g.http:// | ||
| - | GET / | ||
| - | |||
| - | Host: xyz.com | ||
| - | | ||
| - | **CURL AND SOCKS** | ||
| - | \\ | ||
| - | Also see curl examples in [[https:// | ||
| - | |||
| - | curl --socks5 127.0.0.1: | ||
| - | |||
| - | ---- | ||
| __BUILDING THE URL__ | __BUILDING THE URL__ | ||
| + | \\ | ||
| + | [[https:// | ||
| \\ | \\ | ||
| * Parameters | * Parameters | ||
| Line 42: | Line 12: | ||
| * method, headers, data(body) [[https:// | * method, headers, data(body) [[https:// | ||
| - | [[https:// | + | ---- |
| + | FILTERS: | ||
| + | |||
| + | * [[https:// | ||
| + | * Match booleans: ongoing.eq.true | ||
| \\ | \\ | ||
| * The URL above has **two parameters** separated by **&** | * The URL above has **two parameters** separated by **&** | ||
| Line 49: | Line 23: | ||
| * If we are told to separate anything with Space, this is how is encoded in the URL : '' | * If we are told to separate anything with Space, this is how is encoded in the URL : '' | ||
| + | * [[https:// | ||
| Line 63: | Line 38: | ||
| * BACKEND should use/store numeric (ID) primary keys for its logics | * BACKEND should use/store numeric (ID) primary keys for its logics | ||
| + | |||
| + | ---- | ||
| + | |||
| + | * [[https:// | ||
| + | * Sample domains: | ||
| + | * [[http:// | ||
| + | * [[https:// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | **CURL** | ||
| + | \\ | ||
| + | **TODO: curl most common flags** [[https:// | ||
| + | * -H (header) | ||
| + | * -X (request verb to use. Example -X PUT) | ||
| + | \\ | ||
| + | **CRAFTED REQUESTS**\\ | ||
| + | The USER-AGENT makes a request in which they connect to the DOMAIN | ||
| + | |||
| + | GET / | ||
| + | |||
| + | So normally hostname and request comes in DIFFERENT PACKETS. The DOMAIN is not traveling in any packet, that's resolved into an IP. | ||
| + | |||
| + | The entire URL, e.g.: " | ||
| + | |||
| + | |||
| + | METHOD path HTTP/ | ||
| + | Host: hostname | ||
| + | |||
| + | E.g.http:// | ||
| + | GET / | ||
| + | |||
| + | Host: xyz.com | ||
| + | | ||
| + | **CURL AND SOCKS** | ||
| + | \\ | ||
| + | Also see curl examples in [[https:// | ||
| + | |||
| + | curl --socks5 127.0.0.1: | ||
| ---- | ---- | ||