ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-tutor
python-tutor
[Tutor] Making http posts
by Stephen Nelson-Smith other posts by this author
Nov 5 2009 2:08AM messages near this date
Re: [Tutor] Evaluating a string expression | Re: [Tutor] Making http posts
Hello,

I want to make an HTTP POST which will require authentication.

This is because we are using a web tool without an API, and we want a
programatic way of getting content into the tool.  Tech support of the
web tool have said we can just make a POST to the http endpoint.

From the below source, it looks like I just post some text to
/project/4254/stories, with the ID of addStoryForm.

Is the best way to do this just a simple urllib script?

What's the best way to find out from the browser exactly what is being
posted when I use the web interface?  Tcpdump?  Or is the a better
tool?

S.

<a id="addStoryHandle" class="handle" href="#" onclick="return false"> </a>
<div id="addStoryShade" class="shade"> 
	<div class="shadeHeader"> 
		<span id="actionHideAddStories"> &laquo; Add Story</span>
	</div> 
	<form id="addStoryForm" method="post" action="/project/4254/stories"> 
		<input type="hidden" name="hangImmediately" value="false"/> 

		<input type="hidden" name="returnView" value="card"/> 
		<div class="shadeSection"> 
			Text <span class="help"> (1,024 characters max)</span>
			<textarea name="text" id="addStoryText" class="required"
maxlength="1024"> </textarea>
		</div> 
		<div class="shadeSection"> 
			Details <span class="help"> (optional, supports <a
href="http://daringfireball.net/projects/markdown/syntax"
target="_blank"> Markdown</a>)</span>

			<textarea name="details" id="addStoryDetails"> </textarea>
		</div> 
		<div class="shadeSection"> 
			Size <span class="help"> (optional, 16 characters max)</span>
			<input type="text" name="size" maxlength="16"/> 
		</div> 
		<div class="shadeSection"> 

			Tags <span class="help"> (separate by commas)</span>
			<input type="text" name="tags"/> 
		</div> 
		<div class="shadeSection"> 
			<button id="addStoryToBacklog" type="button"> 
				<img src="/content/images/icons/add.png"/> 
				Add to Backlog
			</button> 

			<button id="addStoryToBoard" type="button"> 
				<img src="/content/images/icons/pin.png"/> 
				Hang on Board
			</button> 
		</div> 
	</form> 
</div> 
_______________________________________________
Tutor maillist  -  Tutor@[...].org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
Thread:
Stephen Nelson-Smith
Kent Johnson
Rich Lovely

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved