33 lines
706 B
Markdown
33 lines
706 B
Markdown
|
# Making requests
|
||
|
|
||
|
or using code:
|
||
|
|
||
|
<Tabs>
|
||
|
|
||
|
<TabItem value="research-product-curl" label="Curl">
|
||
|
|
||
|
```bash
|
||
|
curl -X GET "https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108" -H "accept: application/json"
|
||
|
```
|
||
|
</TabItem>
|
||
|
|
||
|
<TabItem value="research-product-python" label="Python">
|
||
|
|
||
|
```python
|
||
|
import requests
|
||
|
|
||
|
url = "https://openaire-api.athenarc.gr/researchProducts/doi_dedup___::2b3cb7130c506d1c3a05e9160b2c4108"
|
||
|
headers = {
|
||
|
"accept": "application/json"
|
||
|
}
|
||
|
|
||
|
response = requests.get(url, headers=headers)
|
||
|
|
||
|
if response.status_code == 200:
|
||
|
print(response.json())
|
||
|
else:
|
||
|
print(f"Request failed with status code {response.status_code}")
|
||
|
```
|
||
|
</TabItem>
|
||
|
|
||
|
</Tabs>
|