Difference between revisions of "Http.delete"

From MiniScript Wiki
Jump to navigation Jump to search
(Created page with "In Mini Micro, the http.delete function uses the DELETE method to return the contents of the URL using the HTTP DELETE protocol. === Arguments === {| class="wikitabl...")
 
m (Change http.delete to only delete the resource)
 
Line 1: Line 1:
In [[Mini Micro]], the [[http]].delete function uses the DELETE method to return the contents of the URL using the HTTP DELETE protocol.
+
In [[Mini Micro]], the [[http]].delete function uses the DELETE method to delete the contents of the URL using the HTTP DELETE protocol.
  
 
=== Arguments ===
 
=== Arguments ===
Line 13: Line 13:
  
 
=== Example ===
 
=== Example ===
The following example, typed on the Mini Micro command line, deletes and retrieves a product from the [https://dummyjson.com DummyJSON web site]
+
The following example, typed on the Mini Micro command line, deletes a product from the [https://dummyjson.com DummyJSON web site]
  
<ms>import "json"
+
<ms>
request = http.delete("https://dummyjson.com/products/1")
+
http.delete("https://dummyjson.com/products/1")
request_data = json.parse(request)
 
pprint request_data
 
 
</ms>
 
</ms>
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]

Latest revision as of 02:04, 17 October 2023

In Mini Micro, the http.delete function uses the DELETE method to delete the contents of the URL using the HTTP DELETE protocol.

Arguments

Parameter Name Meaning
url URL of the web page or resource to fetch
headers optional map of HTTP headers

Example

The following example, typed on the Mini Micro command line, deletes a product from the DummyJSON web site

http.delete("https://dummyjson.com/products/1")