Android Question Json get request header

John Decowski

Member
Licensed User
Anyone have any idea how to add to the get request header when retrieving json? Vimeo API requires me to add my access token to my request header.

Below is what they want in the header.

GEThttps://api.vimeo.com/videos/{video_id}

Refer to Table 1 for the headers.

Table 1. Headers for GET to /videos/{video_id}

Header Set value to
Authorization bearer {access_token}
Accept application/vnd.vimeo.*+json;version=3.4
 

DonManfred

Expert
Licensed User
B4X:
dim job as httpjob
job.initialize(me)
job.download("https://api.vimeo.com/videos/"&videoID) ' videoID hold the ID
job.GetRequest.SetHeader("Authorization",$"bearer ${access_token}"$) ' Call it AFTER Download/Poststring/Postfile
job.GetRequest.SetHeader("Accept",$"application/vnd.vimeo.*+json;version=3.4"$) ' Call it AFTER Download/Poststring/Postfile
Something like this....
 
Top