Set a Canonical URL for an HTML Document in .NET Core

Install-Package Cloudmersive.APIClient.NETCore.DocumentAndDataConvert -Version 2.2.1
using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Api;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Client;
using Cloudmersive.APIClient.NETCore.DocumentAndDataConvert.Model;
namespace Example
{
public class EditHtmlHtmlSetRelCanonicalExample
{
public void main()
{
// Configure API key authorization: Apikey
Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
var apiInstance = new EditHtmlApi();
var canonicalUrl = canonicalUrl_example; // string | The HTML canonical URL to set.
var inputFile = new System.IO.FileStream("C:\\temp\\inputfile", System.IO.FileMode.Open); // System.IO.Stream | Optional: Input file to perform the operation on. (optional)
var inputFileUrl = inputFileUrl_example; // string | Optional: URL of a file to operate on as input. (optional)
try
{
// Sets the rel canonical URL for the HTML document
byte[] result = apiInstance.EditHtmlHtmlSetRelCanonical(canonicalUrl, inputFile, inputFileUrl);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling EditHtmlApi.EditHtmlHtmlSetRelCanonical: " + e.Message );
}
}
}
}

--

--

--

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

Stripe Elements in Next.js

Hoisting and temporal dead zone in Javascript

Main topics to care about before including Motion Designs in your React Native application

Declaring a Javascript Function — Promises, Hoisting, and Arrow Function.

Open Sourcing the Core Extension

Svelte getting started guide

🇸🇪 MySwedish fluency bits #40, att vara droppen.

Download data from ONEDRIVE using command line

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

Easily Use a JavaScript Control in a Blazor Server App

Easily Use a JavaScript Control in a Blazor Server App

TryGetNonEnumeratedCount: New LINQ extensions series — Maytham Fahmi

Task.Delay(n).Wait() vs await Task.Delay(n)

Perform CSV to XML Conversion in C#