# Web Dev doPost Example giving me an error

**URL:** <https://forum.inductiveautomation.com/t/web-dev-dopost-example-giving-me-an-error/61842>\
**Category:** Ignition\
**Tags:** scripting, ignition81, vision\
**Created:** [July 13, 2022, 12:52pm UTC](https://forum.inductiveautomation.com/t/web-dev-dopost-example-giving-me-an-error/61842 "2022-07-13T12:52:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sydney\_Prowse](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@Sydney\_Prowse](https://forum.inductiveautomation.com/u/Sydney_Prowse)\
**Post date:** [July 13, 2022, 12:52pm UTC](https://forum.inductiveautomation.com/t/web-dev-dopost-example-giving-me-an-error/61842/1 "2022-07-13T12:52:22Z")

</div>

I’m trying to do a doPost and I’m following the example linked below, but I’m getting a weird error:

```auto
Server returned HTTP response code: 500 for URL: http://localhost:8088/system/webdev/arduino_project/postjson

```

Can anyone help me with this?

The example:  
[https://docs.inductiveautomation.com/display/DOC80/httpPost](https://docs.inductiveautomation.com/display/DOC80/httpPost)

This is the code for my doPost:

```auto
data = request['postData']
	names = data['names']
	values = data['values']
	# this will print to the wrapper.log file
	print names, values
	 
	# format the string into HTML
	formattedString = "<html><body>"
	# loop through and add names and values
	for i in range(len(names)):
	    formattedString += "%s: %s, " %(names[i], values[i])
	# remove the last ', ' and add closing html
	formattedString = formattedString[:-2]+"</body></html>"
	# this will print to the wrapper.log file
	print formattedString
	 
	# return the value string
	return {'html': formattedString}

```

This is the code for my button:

```auto
projectName = "arduino_project"
doPostName = "postjson"
url = "http://localhost:8088/system/webdev/arduino_project/postjson"
# create the dictionary of parameters to pass in
params = {}
params['names'] = ['String','Integer']
params['values'] = ['Hello World', 42]
# encode dictionary to JSON
jsonParams = system.util.jsonEncode(params)
 
# post to Ignition
postReturn = system.net.httpPost(url, jsonParams)
# print return value
print postReturn

```

I appreciate any help!

---

<div class="post-metadata">

**Author:** ![bmeyers](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bmeyers/32/37453_2.png) [@bmeyers](https://forum.inductiveautomation.com/u/bmeyers)\
**Post date:** [July 13, 2022, 1:42pm UTC](https://forum.inductiveautomation.com/t/web-dev-dopost-example-giving-me-an-error/61842/2 "2022-07-13T13:42:07Z")

</div>

In your button code you typed in the wrong url.

The url should be the following.

```auto
url = "http://localhost:8088/main/system/webdev/%s/%s" %(projectName, doPostName)
```

Notice the **/main/** before **/system/**
