I'm trying to send an HTTP request from my react code to iphub API.
in the document there is an example of how to use in this service:
curl http://v2.api.iphub.info/ip/8.8.8.8 -H "X-Key: 123"
I convert the request according to some answers and it looks like this:
const ripeEndpoint = 'http://v2.api.iphub.info/ip/8.8.8.8'
fetch(ripeEndpoint, {
method: 'GET',
headers: new Headers({
'Access-Control-Allow-Origin': '*',
'Content-Type': 'multipart/form-data',
'X-Key': myApiKey
}),
})
but the response is 404, I think that my request is wrong, how can I know if the converted request correct?