Also worth adding some unit tests, including one which reproduces your 404 
error.

See https://www.youtube.com/watch?v=hVFEV-ieeew for a great video about how 
to 
add these tests.

On Monday, 9 March 2020 14:53:20 UTC, anderso...@blacklane.com wrote:
>
> please post the code as text. Either in a github/whatever repo or here, 
> but please, as text and a runnable code.
>
> I don't see you registering any handler for */register.html*, you have 
> one for */register* only. Also if the method is not POST, you should 
> return *405 Method Not Allowed *instead of 
>
> *404 Not Found.*
> As tip, use the http constants such as http.MethodPost. See them here: 
> https://golang.org/pkg/net/http/#pkg-constants
>
> Best,
> Anderson
>
> On Sunday, 8 March 2020 16:19:20 UTC+1, Ali Hassan wrote:
>>
>> [image: goSnippet.JPG][image: firefox.JPG]
>>
>> [image: xhrSnippet.JPG]
>> [image: htmlSnippnet.JPG]Browser Error 404   please help me resolve this 
>> error. I think this is because of html page but when try this 
>> /register.html then whole page display on my console. I will exchange my 
>> data 
>>
>>
>> [image: buttonSnippnet.JPG]
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/983f155b-947a-4b65-8475-613c856af096%40googlegroups.com.

Reply via email to