@@ -9,7 +9,7 @@ import handleError from './utils/handleError.js';
9
9
* @returns {Promise<string> } A promise that resolves to the markdown representation of the webpage.
10
10
* @throws {Error } Throws an error if the HTTP request fails.
11
11
*/
12
- export async function markdownify ( apiKey , url ) {
12
+ export async function markdownify ( apiKey , url ) {
13
13
const endpoint = 'https://api.scrapegraphai.com/v1/markdownify' ;
14
14
const headers = {
15
15
'accept' : 'application/json' ,
@@ -24,7 +24,7 @@ export async function markdownify(apiKey, url){
24
24
const response = await axios . post ( endpoint , payload , { headers } ) ;
25
25
return response . data ;
26
26
} catch ( error ) {
27
- handleError ( error )
27
+ handleError ( error ) ;
28
28
}
29
29
}
30
30
@@ -36,7 +36,7 @@ export async function markdownify(apiKey, url){
36
36
* @returns {Promise<string> } A promise that resolves with details about the status or outcome of the specified request.
37
37
* @throws {Error } Throws an error if the HTTP request fails.
38
38
*/
39
- export async function getMarkdownifyRequest ( apiKey , requestId ) {
39
+ export async function getMarkdownifyRequest ( apiKey , requestId ) {
40
40
const endpoint = 'https://api.scrapegraphai.com/v1/markdownify/' + requestId ;
41
41
const headers = {
42
42
'accept' : 'application/json' ,
@@ -47,6 +47,6 @@ export async function getMarkdownifyRequest(apiKey, requestId){
47
47
const response = await axios . get ( endpoint , { headers } ) ;
48
48
return response . data ;
49
49
} catch ( error ) {
50
- handleError ( error )
50
+ handleError ( error ) ;
51
51
}
52
- }
52
+ }
0 commit comments