foia.gov | Front-end for the National FOIA Portal
kandi X-RAY | foia.gov Summary
kandi X-RAY | foia.gov Summary
Front-end for the National FOIA Portal
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of foia.gov
foia.gov Key Features
foia.gov Examples and Code Snippets
Community Discussions
Trending Discussions on foia.gov
QUESTION
I am having some trouble running the Freedom of information act API in python. I am sure it is related to how I am implementing my API key but I am uncertain as to where I am dropping the ball. Any help is greatly appreciated.
...ANSWER
Answered 2020-Sep-19 at 03:20According to the documentation, the API requires the API key to be passed as a request header parameter ("X-API-Key"). Your python code appears to be simply concatenating the API key and the URL.
The following Q&A explains how to set a request header using requests
.
It would be something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install foia.gov
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page