Skip to main content
removed the excessive bolding of text
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

How todo I construct an authenticated HTTP request in Postman that will work for Drupal 7?

I have Drupal 7 I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local.

I am trying to prepare an external script I am trying to prepare an external script in PHP or Python (or even in pure bashBash using curl, if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in userwhich will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed... To understand what such a HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts failed.

Here'sThis is what I've done so far:

  1. In the browser, I logged in as admin to my local In the browser, I logged in as administrator of the Drupal 7 instance.site
  2. I opened the I opened the browser on http://drupal.local/en/node/add/article and I received status 200and I received status 200 (theThe page is displayed correctly in my browser).)
  3. In Postman I set In Postman I set:
  • request method on: GET request method on: GET
  • URL: URL: http://drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using Headers: I set all headers identically to those in the developer tool) including current cookies containing the current session key with its value.browser including the current cookies containing the session key with its value
  1. I do not have access to this page and I received the status of 403 Forbidedden. I don't have access to this page and I receive a 403 error

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?How do I construct an authenticated HTTP request in Postman that will work for Drupal 7?

How to construct an authenticated HTTP request in Postman that will work for Drupal 7?

I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local

I am trying to prepare an external script in PHP or Python (or even in pure bash using curl if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed...

Here's what I've done so far:

  1. In the browser, I logged in as admin to my local Drupal 7 instance.
  2. I opened the http://drupal.local/en/node/add/article and I received status 200 (the page is displayed correctly in my browser).
  3. In Postman I set:
  • request method on: GET
  • URL: http://drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using the developer tool) including current cookies containing the current session key with its value.
  1. I do not have access to this page and I received the status of 403 Forbidedden.

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?

How do I construct an authenticated HTTP request in Postman?

I have Drupal 7 installed locally on my computer with the domain set to http://drupal.local.

I am trying to prepare an external script in PHP or Python (or even in pure Bash using curl, if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such a HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts failed.

This is what I've done so far:

  1. In the browser, I logged in as administrator of the Drupal 7 site
  2. I opened the browser on http://drupal.local/en/node/add/article and I received status 200 (The page is displayed correctly in my browser.)
  3. In Postman I set:
  • request method on: GET
  • URL: http://drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser including the current cookies containing the session key with its value
  1. I don't have access to this page and I receive a 403 error

How do I construct an authenticated HTTP request in Postman that will work for Drupal 7?

Fix the urls in question content
Source Link

I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local

I am trying to prepare an external script in PHP or Python (or even in pure bash using curl if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed...

Here's what I've done so far:

  1. In the browser, I logged in as admin to my local Drupal 7 instance.
  2. I opened the http://drupal.local/en/node/add/article and I received status 200 (the page is displayed correctly in my browser).
  3. In Postman I set:
  • request method on: GET
  • URL: http: //drupal.local/en/node/add/articlehttp://drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using the developer tool) including current cookies containing the current session key with its value.
  1. I do not have access to this page and I received the status of 403 Forbidedden.

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?

I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local

I am trying to prepare an external script in PHP or Python (or even in pure bash using curl if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed...

Here's what I've done so far:

  1. In the browser, I logged in as admin to my local Drupal 7 instance.
  2. I opened the http://drupal.local/en/node/add/article and I received status 200 (the page is displayed correctly in my browser).
  3. In Postman I set:
  • request method on: GET
  • URL: http: //drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using the developer tool) including current cookies containing the current session key with its value.
  1. I do not have access to this page and I received the status of 403 Forbidedden.

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?

I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local

I am trying to prepare an external script in PHP or Python (or even in pure bash using curl if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed...

Here's what I've done so far:

  1. In the browser, I logged in as admin to my local Drupal 7 instance.
  2. I opened the http://drupal.local/en/node/add/article and I received status 200 (the page is displayed correctly in my browser).
  3. In Postman I set:
  • request method on: GET
  • URL: http://drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using the developer tool) including current cookies containing the current session key with its value.
  1. I do not have access to this page and I received the status of 403 Forbidedden.

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?

Source Link

How to construct an authenticated HTTP request in Postman that will work for Drupal 7?

I have Drupal 7 installed locally on my computer with the domain set to: http://drupal.local

I am trying to prepare an external script in PHP or Python (or even in pure bash using curl if it does not require a lot of extra work), which will successfully execute an HTTP request by default available only for the logged in user.

To understand what such an HTTP request should look like, I am first trying to perform such a HTTP request using Postman, but all my attempts to date have failed...

Here's what I've done so far:

  1. In the browser, I logged in as admin to my local Drupal 7 instance.
  2. I opened the http://drupal.local/en/node/add/article and I received status 200 (the page is displayed correctly in my browser).
  3. In Postman I set:
  • request method on: GET
  • URL: http: //drupal.local/en/node/add/article
  • Headers: I set all headers identically to those in the browser (I copy them using the developer tool) including current cookies containing the current session key with its value.
  1. I do not have access to this page and I received the status of 403 Forbidedden.

Please help me or suggest me how to construct an authenticated HTTP request in Postman that will work for Drupal 7?