You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-visual-search/quickstarts/csharp.md
+75-75Lines changed: 75 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-visual-search
11
11
ms.topic: quickstart
12
-
ms.date: 05/19/2020
12
+
ms.date: 05/21/2020
13
13
ms.author: scottwhi
14
14
---
15
15
@@ -37,7 +37,7 @@ This quickstart demonstrates how to upload an image to the Bing Visual Search AP
37
37
usingSystem.Collections.Generic;
38
38
```
39
39
40
-
2. Addvariablesfor your subscription key, endpoint, and path to the image you want to upload. You can use the value of `uriBase` in the following code for the global endpoint, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpointdisplayedintheAzureportalfor your resource:
40
+
2. Addvariablesfor your subscription key, endpoint, and path to the image you want to upload. For the `uriBase` value, you can use the global endpoint in the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpointdisplayedintheAzureportalfor your resource:
41
41
42
42
```csharp
43
43
const string accessKey = "<my_subscription_key>";
@@ -189,79 +189,79 @@ This quickstart demonstrates how to upload an image to the Bing Visual Search AP
189
189
190
190
Ifyouuse `HttpClient`, youcanusethe `MultipartFormDataContent` classto build the form data. Use the following sections of code to replace the corresponding methods in the previous example.
2.Create variables for your API endpoint, subscription key, and the path to your image. Youcan use the value of `endpoint` in the following codefor the global endpoint, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource:
51
+
2.Create variables for your API endpoint, subscription key, and the path to your image. For the `endpoint` value, you can use the global endpoint in the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource:
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-visual-search/quickstarts/nodejs.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-visual-search
11
11
ms.topic: quickstart
12
-
ms.date: 05/19/2020
12
+
ms.date: 05/21/2020
13
13
ms.author: scottwhi
14
14
---
15
15
@@ -35,7 +35,7 @@ Use this quickstart to make your first call to the Bing Visual Search API. This
35
35
var fs =require('fs');
36
36
```
37
37
38
-
2. Create variables for your API endpoint, subscription key, and the path to your image. You can use the value of`baseUri`in the following code forthe global endpoint, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource:
38
+
2. Create variables for your API endpoint, subscription key, and the path to your image. Forthe `baseUri`value, you can use the global endpointin the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource:
39
39
40
40
```javascript
41
41
var baseUri = 'https://api.cognitive.microsoft.com/bing/v7.0/images/visualsearch';
@@ -53,25 +53,25 @@ Use this quickstart to make your first call to the Bing Visual Search API. This
53
53
54
54
## Construct and send the search request
55
55
56
-
When you upload a local image, the form data must include the `Content-Disposition`header. Set its `name` parameter to "image", and set the `filename` parameter to any string. The contents of the form include the binary data of the image. The maximum image size you can upload is 1MB.
56
+
1.When you upload a local image, the form data must include the `Content-Disposition`header. Set its `name` parameter to "image", and set the `filename` parameter to any string. The contents of the form include the binary data of the image. The maximum image size you can upload is 1MB.
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-visual-search/quickstarts/python.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-visual-search
11
11
ms.topic: quickstart
12
-
ms.date: 05/19/2020
12
+
ms.date: 05/21/2020
13
13
ms.author: scottwhi
14
14
---
15
15
@@ -31,7 +31,7 @@ Use this quickstart to make your first call to the Bing Visual Search API. This
31
31
import requests, json
32
32
```
33
33
34
-
2. Create variables for your subscription key, endpoint, and the path to the image you're uploading. You can use the value of `BASE_URI` in the following code for the global endpoint, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
34
+
2. Create variables for your subscription key, endpoint, and the path to the image you're uploading. For the value of `BASE_URI`, you can use the global endpoint in the following code, or use the [custom subdomain](../../../cognitive-services/cognitive-services-custom-subdomains.md) endpoint displayed in the Azure portal for your resource.
35
35
36
36
```python
37
37
@@ -65,27 +65,27 @@ Use this quickstart to make your first call to the Bing Visual Search API. This
65
65
66
66
## Parse the JSON response
67
67
68
-
1. Create a method called `print_json()` to take in the API response, andprint the JSON:
68
+
Create a method called `print_json()` to take in the API response, andprint the JSON:
1. Use `requests.post()` to send a request to the Bing Visual Search API. Include the string for your endpoint, header, andfile information. Print `response.json()`with`print_json()`:
78
+
Use `requests.post()` to send a request to the Bing Visual Search API. Include the string for your endpoint, header, and file information. Print `response.json()` with `print_json()`:
Copy file name to clipboardExpand all lines: articles/cognitive-services/bing-visual-search/quickstarts/ruby.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ manager: nitinme
9
9
ms.service: cognitive-services
10
10
ms.subservice: bing-visual-search
11
11
ms.topic: quickstart
12
-
ms.date: 05/19/2020
12
+
ms.date: 05/21/2020
13
13
ms.author: aahi
14
14
---
15
15
@@ -26,14 +26,13 @@ This quickstart uses the Ruby programming language to call Bing Visual Search an
26
26
27
27
## Project and required modules
28
28
29
-
Create a new Ruby project in your IDE or editor. Import `net/http`, `uri` , and `json` to handle the JSON text of results. Import the `base64` library, which is used to encode the file name string:
29
+
Create a new Ruby project in your IDE or editor. Import `net/http`, `uri` , and `json` to handle the JSON text of results. Import the `base64` library, which encodes the file name string:
30
30
31
31
```
32
32
require 'net/https'
33
33
require 'uri'
34
34
require 'json'
35
35
require 'base64'
36
-
37
36
```
38
37
39
38
## Define variables
@@ -62,7 +61,7 @@ end
62
61
63
62
## Form data for POST request
64
63
65
-
1.The image data to POST is enclosed by leading and trailing boundaries. The following functions set the boundaries:
64
+
1.Enclose the image data to POST by leading and trailing boundaries. The following functions set the boundaries:
66
65
67
66
```
68
67
def BuildFormDataStart(batNum, fileName)
@@ -107,7 +106,7 @@ request.body = post_body.join
107
106
108
107
## Request and response
109
108
110
-
Ruby sends the request and gets the response with the following line of code:
109
+
Ruby sends the request and gets the response with the following code:
0 commit comments