{"id":13733734,"url":"https://github.com/noamt/rest-gradle-plugin","last_synced_at":"2025-04-30T12:19:17.490Z","repository":{"id":7112426,"uuid":"8405970","full_name":"noamt/rest-gradle-plugin","owner":"noamt","description":"A Gradle plugin that provides a REST request task infrastructure ","archived":false,"fork":false,"pushed_at":"2016-10-26T11:10:37.000Z","size":184,"stargazers_count":47,"open_issues_count":14,"forks_count":16,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-01-09T21:50:24.259Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/noamt.png","metadata":{"files":{"readme":"README.asciidoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-25T09:16:23.000Z","updated_at":"2021-12-30T08:26:00.000Z","dependencies_parsed_at":"2022-08-19T13:20:48.575Z","dependency_job_id":null,"html_url":"https://github.com/noamt/rest-gradle-plugin","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Frest-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Frest-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Frest-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/noamt%2Frest-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/noamt","download_url":"https://codeload.github.com/noamt/rest-gradle-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233819584,"owners_count":18735302,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T03:00:48.187Z","updated_at":"2025-01-13T23:03:34.930Z","avatar_url":"https://github.com/noamt.png","language":"Groovy","funding_links":[],"categories":["Plugins"],"sub_categories":["Web application development"],"readme":"= REST Gradle Plugin =\n\n== A Gradle plugin that provides a task infrastructure to perform REST requests ==\n\n=== Installation ===\n\nimage:https://travis-ci.org/noamt/rest-gradle-plugin.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/noamt/rest-gradle-plugin\"]\n\nSee the http://plugins.gradle.org/plugin/org.tenne.rest[Gradle Plugin Portal] for installation instructions.\n\n=== Usage ===\n\nThe plugin adds a new task named `rest`. This task exposes the following properties::\n* httpMethod - The type of HTTP method to execute. Type: String. Default: `get`. Possible values: `delete`, `get`, `head`, `options`, `post`, `put`.\n* uri - The target URI of the request. An invocation of toString() on the value should result in a valid URI. Type: Object.\n* username - Authentication username. Type: String.\n* password - Authentication password. Type: String.\n* contentType - The expected content type of both request and response. Type: groovyx.net.http.ContentType / String.\n* requestContentType - The expected content type of the request. Overrides the `contentType` parameter. Type: groovyx.net.http.ContentType / String.\n* requestBody - The request content. Type: Object.\n* requestHeaders - Additional request headers. Type: Map.\n* responseHandler - A custom successful request handler. Type: groovy.lang.Closure. The closure accepts one parameter. May accept the types String, InputStream or Object which falls back to the client's default handler.\n\nFor example, a POST request task:\n[source,groovy]\n----\ntask attack(type: org._10ne.gradle.rest.RestTask) {\n    httpMethod = 'post'\n    uri = 'https://battle.server.com/attack'\n    username = 'player'\n    password = 'password'\n    requestBody = [battleCry: 'FOR LEEROY JENKINS!']\n    contentType = groovyx.net.http.ContentType.JSON\n    requestHeaders = [customHeader: 'WoW']\n    responseHandler = {\n        //Configured content type is JSON and we let the client's handler parse the response for us\n        assert it.message == 'success'\n    }\n}\n----\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoamt%2Frest-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnoamt%2Frest-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnoamt%2Frest-gradle-plugin/lists"}