IWebmasterApi.SaveCrawlSettings(String, CrawlSettings) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Save crawl settings
public:
void SaveCrawlSettings(System::String ^ siteUrl, Microsoft::Bing::Webmaster::Api::Interfaces::CrawlSettings ^ crawlSettings);
[System.ServiceModel.FaultContract(typeof(Microsoft.Bing.Webmaster.Api.Interfaces.ApiFault))]
[System.ServiceModel.OperationContract]
[System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest, Method="POST")]
public void SaveCrawlSettings (string siteUrl, Microsoft.Bing.Webmaster.Api.Interfaces.CrawlSettings crawlSettings);
abstract member SaveCrawlSettings : string * Microsoft.Bing.Webmaster.Api.Interfaces.CrawlSettings -> unit
Parameters
- siteUrl
- String
- crawlSettings
- CrawlSettings
- Attributes
Examples
XML request sample
POST /webmaster/api.svc/pox/SaveCrawlSettings?apikey=sampleapikeyedecc1ea4ae341cc8b6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com
<SaveCrawlSettings xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api">
<siteUrl>http://example.com</siteUrl>
<crawlSettings xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:AjaxEnabled>true</a:AjaxEnabled>
<a:CrawlRate>BQUFBQUFBQUFBQUFBQUFBQYGBgUEAwME</a:CrawlRate>
</crawlSettings>
</SaveCrawlSettings>
XML response sample
HTTP/1.1 200 OK
Content-Length: 0
JSON request sample
POST /webmaster/api.svc/json/SaveCrawlSettings?apikey=sampleapikeyedecc1ea4ae341cc8b6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com
{
"siteUrl":"http://example.com",
"crawlSettings":
{
"__type":"CrawlSettings:#Microsoft.Bing.Webmaster.Api",
"AjaxEnabled":true,
"CrawlRate":[5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
5,
6,
6,
6,
5,
4,
3,
3,
4]
}
}
JSON response sample
HTTP/1.1 200 OK
Content-Length: 10
Content-Type: application/json; charset=utf-8
{
"d":null
}