How to Check an Azure Blob for Viruses in Go

package mainimport (
"fmt"
"net/http"
"io/ioutil"
)
func main() {url := "https://api.cloudmersive.com/virus/scan/cloud-storage/azure-blob/single"
method := "POST"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("connectionString", "<string>")
req.Header.Add("containerName", "<string>")
req.Header.Add("blobPath", "<string>")
req.Header.Add("Apikey", "YOUR-API-KEY-HERE")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}

--

--

--

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is Sylius and How to Use It?

Should You Learn Power Query for PPC?

Using Metal Shading Language for Custom CIKernels — Metal & Swift

Top Channels on YouTube which Programmers should Follow Right Now.

The Future is Micro. Is it?

Watch: Demystifying __init__(self, …) in Python

Encode x NEAR: Intro to NEAR [Video + Slides]

Saying Goodbye to SNAPSHOTs with Gradle’s Composite Builds

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Cloudmersive

Cloudmersive

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.

More from Medium

How to setup streaming replication in PostgreSQL step by step on Ubuntu

TLS and Mutual TLS

Getting started with Kubernetes

Maria DB on K8 pros and crons