An OpenDevelop add-in that provides HTTP client support for .http and .rest files, similar to VS Code's REST Client extension.
- Open and edit
.http/.restfiles in OpenDevelop - Syntax highlighting for HTTP requests
- Send HTTP requests and view responses
- Variable support (file variables, environment variables, system variables)
- Named requests for request chaining
- Request separator (
###) support - Authentication (Basic, Bearer, Digest, AWS Signature v4, Cognito, OAuth2, Azure AD v2, OIDC, SSL client cert)
- Cookie jar for subsequent requests
- Proxy support
- cURL import/export
- Code snippet generation (Python, JavaScript, C#, cURL)
- Request history
- Hover tooltips and Go to Definition
- Code completion (Ctrl+Space)
- Open OpenDevelop
- Go to Tools > Options > AddIns > Trusted repositories
- Add
lextudio/opendevelop-httpclientas a trusted repository - Open Tools > AddIn Manager
- Search for "HTTP Client" and install
- Restart OpenDevelop
- Download the latest
.odaddinfile from Releases - In OpenDevelop, go to Tools > AddIn Manager > Install from file
- Select the downloaded
.odaddinfile - Restart OpenDevelop
# Clone the repository
git clone https://github.com/lextudio/opendevelop-httpclient.git
cd opendevelop-httpclient
# Set OpenDevelop root
export OPENDEVELOP_ROOT=/path/to/OpenDevelop
# Build
cd src/OpenDevelop.HttpClient
dotnet build OpenDevelop.HttpClient.csproj -p:OpenDevelopRoot=/path/to/OpenDevelop/The build output is deployed to $(OpenDevelopRoot)AddIns/Misc/HttpClient/.
- Create a
.httpor.restfile in your project - Write HTTP requests:
GET https://httpbin.org/get HTTP/1.1
Accept: application/json
###
POST https://httpbin.org/post HTTP/1.1
Content-Type: application/json
{
"name": "test",
"value": 42
}- Place cursor on a request and press Tools > Send HTTP Request (or right-click > Send Request)
- View the response in a new document tab
@host = api.example.com
@token = {{$guid}}
GET https://{{host}}/api/users HTTP/1.1
Authorization: Bearer {{token}}Create http-client.env.json in your workspace:
{
"dev": {
"host": "localhost:8080",
"token": "dev-token"
},
"prod": {
"host": "api.example.com",
"token": "prod-token"
}
}Switch environments via Tools > Switch HTTP Environment.
# Basic Auth
GET https://httpbin.org/basic-auth/user/pass HTTP/1.1
Authorization: Basic user pass
# Bearer Token
GET https://api.example.com/data HTTP/1.1
Authorization: Bearer {{token}}
# AWS Signature v4
GET https://s3.amazonaws.com/bucket/key HTTP/1.1
Authorization: AWS accessKey secretKey region:us-east-1 service:s3This add-in leverages Microsoft.DotNet.Interactive.Http.Parsing (MIT licensed) for parsing .http files and converting parsed requests to .NET HttpRequestMessage objects. The parser source is embedded in the Parsing/ directory.
# Set OpenDevelop root
export OPENDEVELOP_ROOT=/path/to/OpenDevelop
# Build
cd src/OpenDevelop.HttpClient
dotnet build OpenDevelop.HttpClient.csproj -p:OpenDevelopRoot=/path/to/OpenDevelop/cd tests/HttpClient.Tests
dotnet test HttpClient.Tests.csprojMIT (same as Microsoft.DotNet.Interactive.Http.Parsing)