Skip to content

WebInstruction element

Markus Hastreiter edited this page Feb 12, 2020 · 2 revisions

<WebInstruction> element

The <WebInstruction> element is used to perform an HTTP request. RepoCop uses the HttpClient class to send an HTTP request.

Attributes

Attribute name Status Default Description
ContentType optional application/json The "Content-Type" content header on an HTTP response.
HttpMethod optional POST The HTTP method.
Url mandatory The URL to call. Replacement tokens are supported.
Content mandatory The string content of the HTTP request. Replacement tokens are supported.

Example

  <!-- Notify project leader about every change -->
  <WebInstruction ContentType="application/json" HttpMethod="POST" Url="https://myjenkins/generic-webhook-trigger/invoke?token=MYTOKEN" Content="{ "rev": "#revision#", "paths": "#affectedpaths#" }" />

Clone this wiki locally