Solved

HTTP Header Question

Posted on 2016-08-16
10
89 Views
Last Modified: 2016-08-22
Hello EE,

Is it possible to read the value of a POST Header Entity Response Body value ?
in other words, If I have an Entity  Content-Length : 56

how can I know its value ? I know its the length, but how can I see what is it? doesnt matter if its ASCII or something else to me

another question attached to this is, if I know its value, is it possible to achieve the same results with a Querystring after ?
0
Comment
Question by:PhilippeRenaud
  • 4
  • 4
  • 2
10 Comments
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41758583
The simple answer is:

The .Net version of $_GET[] is :

 Request.Querystring["parameter1"]

The .Net version of $_POST[] is :

 Request.Form["paramName"];

Frameworks that are available with .NET hide these under other functions.
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 41758635
Can you explain more about the problem you are trying to solve?
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 41758752
YEs alright Kaufmed :

in Fiddler4 software, I see that whenever I type something in a Textbox, I see a Link (no querystring) doing a POST with a response body of the name "textValue"  and value : whatever I typed..

I want to be more efficiant for the job I have to do and I would like to "post" stuff without me going to type every hour myself.
I want my vb.net to do the same thing. So I was trying to understand what to do as a POST to achieve the same thing as If I was typing on the keyboard on that textbox
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41758818
In the web, HTML forms are used to 'POST' data to a server.  The only common method for 'POST'ing is to use cURL.  PHP has it's own built-in cURL extension, I don't know if .NET has such a thing.  More info here: https://curl.haxx.se/
0
 
LVL 82

Expert Comment

by:Dave Baldwin
ID: 41758819
Actually, you can use jQuery in an HTML page to post data from a form page.  You might be able to use that to do it programmatically.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 41758840
If you are simply trying to programmatically post data to a web server, then you would use either the HttpClient our WebClient classes. The former is preferred over the latter.
0
 
LVL 82

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 250 total points
ID: 41758910
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 41759372
Yep. I was on my phone at the time, so I that's why I didn't link it   = )
0
 
LVL 1

Author Comment

by:PhilippeRenaud
ID: 41759525
If I get an error like this :

The remote server returned an error: (403) Forbidden.

on a line :

Dim responseLoginToPage1 As HttpWebResponse = DirectCast(requestLoginToPage1.GetResponse(), HttpWebResponse)

Open in new window


is it possible im just not allowed to do this or maybe its something else I could do wrong ?
0
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 250 total points
ID: 41759722
Confirm whether or not SSL is enabled for that service. If it is, make sure you're sending your request as HTTPS in the URL.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now