-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6238649
commit 63b702a
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
const url = 'https://korcen.shibadogs.net/api/v1/korcen' | ||
|
||
const headers = { | ||
'accept': 'application/json', | ||
'Content-Type': 'application/json' | ||
} | ||
|
||
const data = { | ||
input: '욕설이 포함될수 있는 메시지', | ||
'replace-front': '<', | ||
'replace-end': '>' | ||
} | ||
|
||
fetch(url, { | ||
method: 'POST', | ||
headers: headers, | ||
body: JSON.stringify(data) | ||
}) | ||
.then(response => { | ||
console.log(response.status) | ||
return response.json() | ||
}) | ||
.then(data => { | ||
console.log(data) | ||
}) | ||
.catch(error => { | ||
console.error('Error:', error) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import requests | ||
|
||
url = 'https://korcen.shibadogs.net/api/v1/korcen' | ||
|
||
headers = { | ||
'accept': 'application/json', | ||
'Content-Type': 'application/json' | ||
} | ||
|
||
data = { | ||
'input' : '욕설이 포함될수 있는 메시지', | ||
'replace-front': '<', | ||
'replace-end' : '>' | ||
} | ||
|
||
response = requests.post(url, headers=headers, json=data) | ||
|
||
print(response.status_code) | ||
print(response.text) |