[Tutor] Making http posts
Stephen Nelson-Smith
sanelson at gmail.com
Thu Nov 5 11:06:47 CET 2009
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">« 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>
More information about the Tutor
mailing list