Note: This API documentation is for FAKE version 4. The migration API documentation can be found here. The API documentation for the new fake 5 modules can be found here

REST

Contains functions to execute typical HTTP/REST calls.

Nested types and modules

TypeDescription
PostMethod

Option type for the HTTP verb

Functions and values

Function or valueDescription
ExecuteGetCommand userName password url
Signature: userName:string -> password:string -> url:string -> string

Executes an HTTP GET command and retrives the information. It returns the response of the request, or null if we got 404 or nothing.

Parameters

  • userName - The username to use with the request.
  • password - The password to use with the request.
  • url - The URL to perform the GET operation.
ExecutePost url userName password data
Signature: url:string -> userName:string -> password:string -> data:string -> string

Executes an HTTP POST command and retrives the information. It returns the response of the request, or null if we got 404 or nothing.

Parameters

  • url - The URL to perform the POST operation.
  • userName - The username to use with the request.
  • password - The password to use with the request.
  • data - The data to post.
ExecutePostCommand(...)
Signature: headerF:(WebHeaderCollection -> unit) -> url:string -> userName:string -> password:string -> data:string -> string

Executes an HTTP POST command and retrives the information.
This function will automatically include a "source" parameter if the "Source" property is set. It returns the response of the request, or null if we got 404 or nothing.

Parameters

  • headerF - A function which allows to manipulate the HTTP headers.
  • url - The URL to perform the POST operation.
  • userName - The username to use with the request.
  • password - The password to use with the request.
  • data - The data to post.