Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6163519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T21:50:19+00:00 2026-05-23T21:50:19+00:00

To get a response from an API, the key must be sent as a

  • 0

To get a response from an API, the key must be sent as a header along with the request. If I send it from the command line using curl -Ss -H "APIKEY: KEY" https://www.example.com/some/stuff the request succeeds. However, if I send it using

my $path = "https://www.example.com/some/stuff"
my $mech = WWW::Mechanize->new();
$mech->add_header('APIKEY'=>'KEY');
$mech->get($path);

I receive Error GETing https://www.example.com/some/stuff: Can't connect to www.example.com:443 (Permission denied). How can I properly supply this header so I authenticate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T21:50:21+00:00Added an answer on May 23, 2026 at 9:50 pm

    I wrote a server side script that shows the output of headers from both examples and APIKEY was set identically in both cases. There were some differences in HTTP_ACCEPT / HTTP_ACCEPT_ENCODING and WWW::Mechanize adds some additional headers:

    'downgrade-1.0' => '1'
    'force-response-1.0' => '1'
    'nokeepalive' => '1'
    

    So I would suggest the problem is somewhere else.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using the following in the web page but can't get a response from
I am trying following, 1. Get response using Ajax from the users selection which
Can't get Location header from response at all. Wireshark says that i've got one:
I noticed that Feedzirra uses this regex to get the ETag from response header:
I have did a curl request and get the response bellow: $ curl -s
I am trying to send a GET request to the Imgur API to upload
When I request from LinkedIn a request token to https://api.linkedin.com/uas/oauth/requestToken , I get the
After I get response from httpwebrequest, I'd like the cookies obtained to save for
Using the API, trying to get items in a specific feed returns this: {direction:ltr,id:feed/
I want to make a captcha validation. I get the key from the recaptcha

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.