Skip to content

Commit

Permalink
Added support for PATCH http method
Browse files Browse the repository at this point in the history
Fixes #24
  • Loading branch information
madskristensen committed Apr 26, 2022
1 parent a6ae485 commit d112cba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/RestClient/Client/RequestSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ private static HttpMethod GetMethod(string? methodName)
"delete" => HttpMethod.Delete,
"options" => HttpMethod.Options,
"trace" => HttpMethod.Trace,
"patch" => new HttpMethod("PATCH"),
_ => HttpMethod.Get,
};
}
Expand Down
3 changes: 2 additions & 1 deletion src/RestClientVS/Editor/IntelliSenseCatalog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ public class IntelliSenseCatalog
{
{"GET", "The GET method is used to retrieve information from the given server using a given URI.Requests using GET should only retrieve data and should have no other effect on the data."},
{"HEAD", "Same as GET, but transfers the status line and header section only."},
{"PATCH", "A PATCH request is considered a set of instructions on how to modify a resource. Contrast this with PUT; which is a complete representation of a resource."},
{"POST", "A POST request is used to send data to the server, for example, customer information, file upload, etc. using HTML forms"},
{"PUT", "Replaces all current representations of the target resource with the uploaded content."},
{"DELETE", "Removes all current representations of the target resource given by a URI."},
{"TRACE", "Performs a message loop-back test along the path to the target resource."},
{"OPTIONS", "Describes the communication options for the target resource."},
{"OPTIONS", "Describes the communication options for the target resource."},
};

public static readonly IDictionary<string, string> HttpHeaderNames = new Dictionary<string, string>()
Expand Down

0 comments on commit d112cba

Please sign in to comment.