πAPI Request's
Examples of Request Forms to the Hercai API of Some Programming Languages;
π₯οΈ Shell
curl --request GET \
--url 'https://hercai.onrender.com/v3/hercai?question=hi how are you?' \
--header 'authorization: your_apikey' \
--header 'content-type: application/json'π΅ Go
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://hercai.onrender.com/v3/hercai?question=hi how are you?"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("content-type", "application/json")
req.Header.Add("authorization", "your_apikey")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}π’ NodeJS
π‘ JavaScript
β Java
π΅π‘ Python
π· PHP
Last updated
Was this helpful?